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

Uncatchable exception when parsing entryPoint #415

Closed
gunzip opened this issue Jan 23, 2020 · 4 comments
Closed

Uncatchable exception when parsing entryPoint #415

gunzip opened this issue Jan 23, 2020 · 4 comments

Comments

@gunzip
Copy link
Contributor

gunzip commented Jan 23, 2020

In a MultiStrategy, getSamlOptions may not find a suitable entrypoint to pass to the saml client
so we end up with entryPoint = undefined. This causes the NodeJS process to crash since these lines here: https://github.com/bergie/passport-saml/blob/master/lib/passport-saml/saml.js#L307
contain an uncheck call to url.parse which throws since entryPoint is not defined. As we are in a callback there's no way to catch the exception and the process exits. I guess the whole method should be wrapped in a try / catch block (not that this may be used as a DoS against the service provider)

@markstos
Copy link
Contributor

@gunzip Are you willing to contribute a pull request to improve this? Thanks for the report.

@googamanga
Copy link

Hitting this issue to, getting unhandledPromise error if running "return done(new Error('saml not found'))" inside of getSamlOptions

@googamanga
Copy link

@gunzip is there a work around?

@cjbarth
Copy link
Collaborator

cjbarth commented Oct 14, 2022

This problem is no longer in this repository. The affected code is now in node-saml. If the problem persists, please re-open this over there.

@cjbarth cjbarth closed this as completed Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants