Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real Error should also been handled as failed if multiple url provided #120

Open
2 tasks done
Sczlog opened this issue Jun 14, 2023 · 0 comments
Open
2 tasks done

Comments

@Sczlog
Copy link

Sczlog commented Jun 14, 2023

  • 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

when given multiple ldap server url, when first ldap server is not connectable, will throw error to callback.

Steps to Reproduce

  1. set two ldap server for strategy(one main and one backup), make main one not connectable and backup one run properly
  2. try to login a correct user.
  3. error will be thrown when main ldap server failed to connect as connection error is considered as other errors.
    image

my internal solution is passthrough error returned by passport which code is eqaul to ETIMEDOUT or ECONNREFUSED, if the url is match main server, but I feel unsafe using such method to passthrough error and it may cause request hang.

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

No branches or pull requests

1 participant