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

Fix: Remove double URL escape in HTTP::Server::Response.redirect #13321

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

threez
Copy link
Contributor

@threez threez commented Apr 14, 2023

fixes #13320

I tried to use the Oauth2::Client from Crystal it suggests to redirect the browser (https://github.com/crystal-lang/crystal/blob/master/src/oauth2/client.cr#L26-L28) after getting the authorization uri. The returned type is an URI already and thus encoded. In my case I was using it to connect to a keycloak, and I wondered, why keycloak doesn't accept the redirect_uri, then I noticed it was encoded twice.

This PR avoids encoding twice.

@threez threez changed the title fixes #13320 remove double HTTP::Server::Response.redirect url escapes Apr 14, 2023
@straight-shoota straight-shoota added this to the 1.9.0 milestone Apr 15, 2023
@straight-shoota straight-shoota changed the title remove double HTTP::Server::Response.redirect url escapes Fix: Remove double URL escape in HTTP::Server::Response.redirect Apr 18, 2023
@straight-shoota straight-shoota merged commit d907d50 into crystal-lang:master Apr 18, 2023
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP::Server::Response.redirect urlescapes twice
4 participants