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
{{ message }}
Repository navigation
Reactive OAuth2 using query parameters for access_token can cause HTTP 500s #7011
When using ServerBearerTokenAuthenticationConverter with setAllowUriQueryParameter(true) then there is a possibility that the web server will return a HTTP 500 when the query parameter is not filled in. E.g: /hello?access_token=
Edit: This problem potentially also affects DefaultBearerTokenResolver
Actual Behavior
ServerBearerTokenAuthenticationConverter.convert method throws a IllegalArgumentException due to the string being passed to BearerTokenAuthenticationToken::new being empty.
Expected Behavior
The expected behaviour should be that the query parameter is validated in the ServerBearerTokenAuthenticationConverter.token method and a OAuth2AuthenticationException is thrown.
The validation should be similar/same as if the token was being provided from HTTP Header.
Thanks for the detailed report @bhavikkumar! I put together a pull request that I'll have @jzheaux review. This particular issue is scheduled for 5.2.0.RC1 but I also created a backport issue (gh-7021) to get this in 5.1.6
Activity
rwinch commentedon Jun 19, 2019
Thanks for the detailed report @bhavikkumar! I put together a pull request that I'll have @jzheaux review. This particular issue is scheduled for 5.2.0.RC1 but I also created a backport issue (gh-7021) to get this in 5.1.6
ServerBearerTokenAuthenticationConverter Handles Empty Tokens
ServerBearerTokenAuthenticationConverter Handles Empty Tokens
ServerBearerTokenAuthenticationConverter Handles Empty Tokens