-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
OidcClientInitiatedLogoutSuccessHandler url-encodes PostLogoutRedirectUri twice #9511
Comments
@hosea The supplied
I believe if you change it to the (un)encoded version, it will work:
Please try this and let me know if it worked. |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Hi @jgrandja, unfortunatly this does not work. If I replace the encoding with an unencoded version, the result is also wrong: But I could break down the problem a little bit. I think, the method Kind regards |
Hi @jgrandja, |
Thanks, @hosea, I was able to confirm the issue. It appears that both I think this can be addressed by changing @hosea, are you able to submit a PR that addresses the issue and adds a test to confirm the bug is fixed? |
…. Now encodes already encoded queryparameters in postLogoutRedirectUrl correctly
Now encodes already encoded queryparameters in postLogoutRedirectUrl correctly Closes gh-9511
Now encodes already encoded queryparameters in postLogoutRedirectUrl correctly Closes gh-9511
Now encodes already encoded queryparameters in postLogoutRedirectUrl correctly Closes gh-9511
Now encodes already encoded queryparameters in postLogoutRedirectUrl correctly Closes spring-projectsgh-9511
The OidcClientInitiatedLogoutSuccessHandler url-encodes the PostLogoutRedirectUri twice. This leads to corrupted URLs.
My used postLogoutRedirectUri is:
https://localhost:8443/loginselect?forwardUrl=secureduserinfo%3F0-1.-userinfo-sessioninvalidate
OidcClientInitiatedLogoutSuccessHandler adds this uri as queryparam "post_logout_redirect_uri" to the generated targetUrl. URL-encoding this uri as queryparam should lead to a queryparam like this:
...&post_logout_redirect_uri =https://localhost:8443/loginselect?forwardUrl%3Dsecureduserinfo%253F0-1.-userinfo-sessioninvalidate
But it is url-encoded twice:
...&post_logout_redirect_uri=https://localhost:8443/loginselect?forwardUrl%3Dsecureduserinfo%25253F0-1.-userinfo-sessioninvalidate
(%2525 instead of %25)
Version: spring-security-oauth2-client 5.4.5
The text was updated successfully, but these errors were encountered: