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

Propagate error on LDAPS SSL cert verification failure #3136

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

precisionconage
Copy link

Fixes #3012.

The problem was that failing to verify the cert emits an error rather than calling the error callback, so errorFunc would catch the error and ldapBindFut would never return/throw.

@ocdtrekkie ocdtrekkie added the ready-for-review We think this is ready for review label Feb 10, 2020
@ocdtrekkie
Copy link
Collaborator

Thanks for this! Silent failures are always a little unfortunate for troubleshooting.


try {
ldapBindFut.wait();
} catch (err) {
return { error: err };
}
}

client.on("error", errorFunc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intended that we may end up registering multiple on-error handlers? What is the effect of running both? You moved this line down here, so I guess ordering is important? Might be worth a comment explaining that this is expected, otherwise it looks like it could be a mistake.

@ocdtrekkie ocdtrekkie removed the ready-for-review We think this is ready for review label Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sandstorm silently fails LDAP login after LDAP certificate is updated
3 participants