comparison mod_auth_ldap/mod_auth_ldap.lua @ 3565:7344513ee160

mod_auth_ldap: Log any error message from open_simple() when testing password
author Kim Alvefur <zash@zash.se>
date Mon, 29 Apr 2019 00:04:16 +0200
parents 3af2da030397
children b50be75c8bef
comparison
equal deleted inserted replaced
3564:35f1dbc943d8 3565:7344513ee160
107 end 107 end
108 }); 108 });
109 end 109 end
110 elseif ldap_mode == "bind" then 110 elseif ldap_mode == "bind" then
111 local function test_password(userdn, password) 111 local function test_password(userdn, password)
112 return not not lualdap.open_simple(ldap_server, userdn, password, ldap_tls); 112 local ok, err = lualdap.open_simple(ldap_server, userdn, password, ldap_tls);
113 if not ok then
114 log("debug", "ldap open_simple error: %s", err);
115 end
116 return not not ok;
113 end 117 end
114 118
115 function provider.test_password(username, password) 119 function provider.test_password(username, password)
116 local dn = get_user(username); 120 local dn = get_user(username);
117 if not dn then return end 121 if not dn then return end