-
Notifications
You must be signed in to change notification settings - Fork 207
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
Matching wrong provider when name is a substring of another provider #153
Closed
tommymccallig opened this issue
Feb 16, 2018
· 3 comments
· Fixed by #154, qstream/omniauth-saml#2 or qstream/omniauth-saml#3
Closed
Matching wrong provider when name is a substring of another provider #153
tommymccallig opened this issue
Feb 16, 2018
· 3 comments
· Fixed by #154, qstream/omniauth-saml#2 or qstream/omniauth-saml#3
Comments
tommymccallig
added a commit
to qstream/omniauth-saml
that referenced
this issue
Feb 19, 2018
This was referenced Feb 19, 2018
This seems like a valid report. How come you opened your PR against a fork? |
Ah, I see there's another PR |
@md5 Hi Mike, I've opened it against a fork and merged it so we can get this into production on our end as soon as possible. Obviously it would be ideal to have it available here so we don't diverge - |
tommymccallig
added a commit
to qstream/omniauth-saml
that referenced
this issue
Feb 19, 2018
tommymccallig
added a commit
to qstream/omniauth-saml
that referenced
this issue
Feb 19, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Because the check in
other_phase
usescurrent_path.start_with?(request_path)
, it will match a provider whose name is a substring of another provider.https://github.com/omniauth/omniauth-saml/blob/master/lib/omniauth/strategies/saml.rb#L72
request_path
is defined in https://github.com/omniauth/omniauth/blob/master/lib/omniauth/strategy.rb#L386as
This can result in the wrong provider being set in
env['omniauth.strategy']
and the wrong setup phase being run, etc.Example:
provider1
provider10
If the path is
/auth/provider10/metadata
, then we'll matchprovider1
, setenv['omniauth.strategy']
toprovider1
and run its setup phase.The text was updated successfully, but these errors were encountered: