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

Doorkeeper's redirect_uri validation is not implemented according to specification #1718

Open
ThisIsMissEm opened this issue Jul 25, 2024 · 0 comments
Labels

Comments

@ThisIsMissEm
Copy link
Contributor

Doorkeeper currently allows for various non-standard practices around redirect URIs, such as ignoring order of query string parameters: https://github.com/doorkeeper-gem/doorkeeper/blob/main/lib/doorkeeper/oauth/helpers/uri_checker.rb#L22-L28

In the OAuth 2.0 specification, it is very clear that redirect_uri's must be compared with simple string comparison: i.e., the strings must be exactly equal, without any parsing or manipulation. (even though RFC 3986 does contain other comparison mechanisms, OAuth expects simple string comparison)

In OAuth 2.0 Security Best Current Practices this is reiterated, since things like wildcard redirects and non-simple string comparison can lead to Redirect URI Validation Attacks on Authorization Code Grant.

Whilst changing Doorkeeper to be inline with the specification and security best current practices would be a major breaking change, it would improve the security of all users of Doorkeeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants