ep_ldapauth
ep_ldapauth copied to clipboard
Bind with empty password allowed
Hi, I noticed a worrisome behaviour when using an empty password to log in with your plugin. The ldapjs authenticate() function does not seem to fail when providing an empty password. This is apparently known and unfortunately an AD legal behaviour. Refer to https://github.com/mcavage/node-ldapjs/issues/191 for more information. If you need more details about this particular behaviour on my setup, let me know.
I noticed the same with AD as the LDAP directory. I added a simple check for empty password in ep_ldapauth.js function exports.authenticate, after the variable definitions and before LDAP authentication:
if (!password) {
console.error('ep_ldapauth.authenticate: Empty password!');
return cb([false]);
}