tykeal / ep_ldapauth

(Up for adoption) LDAP authentication plugin for Etherpad-lite
GNU General Public License v2.0
25 stars 20 forks source link

Bind with empty password allowed #27

Open gfargeas opened 9 years ago

gfargeas commented 9 years ago

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.

xerya commented 8 years ago

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]);
}