You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions, such as how to use the library, there).
I believe this is an issue in this library and not in the underlying libraries ldapjs or ldapauth-fork. (This library is a passport strategy and does not implement the LDAP communication)
Problem Description
I am building an ldap authentication flow for my app and I am encountering a condition where the errorHandler is called twice, leading to the passport.authenticate callback to be called twice.
I believe this is caused by line 274 ldap.once('error', errorHandler);, which proceeds to call ldap.authenticate without ensuring the server connection is valid. Sometimes the errorHandler after // Other errors are (most likely) real errors is called first, sometimes it is called second, so it is a race condition, but they shouldn't ever be called twice anyhow.
Steps to Reproduce
Set up LdapStrategy with url pointing to an unreachable server. In my case, it is a server inside an internal network that I do not have access to. The specific error is ENOTFOUND, so I think putting in any invalid url should work.
Problem Description
I am building an ldap authentication flow for my app and I am encountering a condition where the
errorHandler
is called twice, leading to thepassport.authenticate
callback to be called twice.I believe this is caused by line 274
ldap.once('error', errorHandler);
, which proceeds to callldap.authenticate
without ensuring the server connection is valid. Sometimes the errorHandler after// Other errors are (most likely) real errors
is called first, sometimes it is called second, so it is a race condition, but they shouldn't ever be called twice anyhow.Steps to Reproduce
Set up LdapStrategy with
url
pointing to an unreachable server. In my case, it is a server inside an internal network that I do not have access to. The specific error isENOTFOUND
, so I think putting in any invalid url should work.Error will be output twice.
The text was updated successfully, but these errors were encountered: