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

Should redirect uri check ignore query params? #660

Open
patrick91 opened this issue Nov 17, 2023 · 1 comment
Open

Should redirect uri check ignore query params? #660

patrick91 opened this issue Nov 17, 2023 · 1 comment
Labels
area/api The OAuth/client app API bug Something isn't working

Comments

@patrick91
Copy link

I was trying to setup buffer today, and their redirect uri looks something like this: https://account.buffer.com/channels/connect?connectingMastodon=true&server=serverName&followBuffer=false

Which seems to break the check in here:

if application.redirect_uris and redirect_uri not in application.redirect_uris:
return render(
request,
"api/oauth_error.html",
{"error": "Invalid application redirect URI"},
status=401,
)

Putting the full URL worked in the application object worked, so I was wondering if we should ignore query params 😊

@andrewgodwin
Copy link
Member

That's strictly against the OAuth spec:

redirect_uri
         REQUIRED, if the "redirect_uri" parameter was included in the
         authorization request as described in [Section 4.1.1](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.1), and their
         values MUST be identical.

If it's just Buffer, I'm not entirely inclined to fix it unless other stuff starts doing it too?

@andrewgodwin andrewgodwin added bug Something isn't working area/api The OAuth/client app API labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api The OAuth/client app API bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants