Skip to content
This repository was archived by the owner on May 8, 2019. It is now read-only.

crash if email is empty in LDAP #12

Open
lorieri opened this issue Mar 27, 2015 · 1 comment
Open

crash if email is empty in LDAP #12

lorieri opened this issue Mar 27, 2015 · 1 comment

Comments

@lorieri
Copy link

lorieri commented Mar 27, 2015

if the email (mail field) is empty the app crashes

@raesene
Copy link

raesene commented Sep 2, 2015

I'm seeing this issue as well. To provide a bit more information. We're using the docker container 0.4.2 and the LDAP directory is Active Directory. Where the users e-mail field is blank, when they try to authenticate the container exits. Docker logs shows the error as

Release 0.4.2

/usr/src/app/node_modules/lets-chat-ldap/lib/auth.js:93
    var email = ldapEmail.toString().split(',')[0];
                         ^
TypeError: Cannot read property 'toString' of undefined
    at Function.Ldap.createLdapUser (/usr/src/app/node_modules/lets-chat-ldap/lib/auth.js:93:26)
    at Query.<anonymous> (/usr/src/app/node_modules/lets-chat-ldap/lib/auth.js:82:18)
    at /usr/src/app/node_modules/mongoose/node_modules/kareem/index.js:177:19
    at /usr/src/app/node_modules/mongoose/node_modules/kareem/index.js:109:16
    at process._tickCallback (node.js:355:11)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants