Skip to content

Revert disallowing query params in redirect_uri #1535

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

Conversation

menisy
Copy link
Contributor

@menisy menisy commented Oct 5, 2021

Summary

This PR reverts the change introduced in #1528 for disallowing query params in redirect_uri. As per the specs, it SHOULD (even though discouraged) be allowed for the client to set query params in the redirect URI if it needs to. In that case, the authorization server should only match the scheme, authority, and path.

Ref: https://datatracker.ietf.org/doc/html/rfc6749#section-3.1.2.2

The authorization server SHOULD require the client to provide the
complete redirection URI (the client MAY use the "state" request
parameter to achieve per-request customization). If requiring the
registration of the complete redirection URI is not possible, the
authorization server SHOULD require the registration of the URI
scheme, authority, and path (allowing the client to dynamically vary
only the query component of the redirection URI when requesting
authorization).

@menisy menisy force-pushed the revert-disallowing-query-params-in-redirect_uri branch from b0ea9c3 to 10fff05 Compare October 5, 2021 13:43
@nbulaj
Copy link
Member

nbulaj commented Oct 5, 2021

Well, the important thing is the first part of the sentence:

If requiring the registration of the complete redirection URI is not possible

I don't see the reasons why it's impossible for Doorkeeper 🤔

Also I have to find more time to go through the docs more carefully with the redirect URI validation rules

@nbulaj
Copy link
Member

nbulaj commented Oct 5, 2021

Anyway, since this change break a lot of apps I consider to merge and release it. After we(I) can think about more detailed check of the specs and releasing minor version with the fix

@nbulaj nbulaj merged commit d269b5e into doorkeeper-gem:main Oct 5, 2021
@menisy menisy deleted the revert-disallowing-query-params-in-redirect_uri branch October 5, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants