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 encode_client_secret_basic to match RFC 6749 #594

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

adamrimon
Copy link
Contributor

@adamrimon adamrimon commented Nov 16, 2023

Added url encoding of client_id and client_secret in encode_client_secret_basic per RFC 6749:
https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1

This fixes the unsupported situation where there is a colon character in the client_id or in the client_secret.

DO NOT SEND ANY SECURITY FIX HERE. Please read "Security Reporting" section
on README.

What kind of change does this PR introduce? (check at least one)


  • You consent that the copyright of your pull request source code belongs to Authlib's author.

added url encoding of client_id and client_secret in encode_client_secret_basic per RFC 6749:
https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1
@lepture lepture merged commit 2000462 into lepture:master Nov 21, 2023
8 checks passed
@lepture
Copy link
Owner

lepture commented Aug 24, 2024

@Prilkop reverted, it caused too many bugs.

You can quote your client_id and client_secret at first in your own code.

@adamrimon
Copy link
Contributor Author

I agree with that I can quote the client_id and client_secret in my own code, but that's clearly against the RFC (requiring both to be url-encoded).
The bugs I saw were of people using previous version along with the new one - of course that could lead to a bug as this change fixes the previous incompatible wrong behavior (that is incompatible with other, compliant, servers).

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.

Client ID containing a colon doesn't work with OAuth2's client_secret_basic authentication method
2 participants