Skip to content

Fix parsing of Basic HTTP Authentication Scheme on the OP side #25

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

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

c00kiemon5ter
Copy link
Member

  • URL-encoding and decoding is not part of the Basic HTTP Authentication Scheme.
  • The user-id is not allowed to contain colons (:).
  • The password is allowed to contain colons (:).

Quoting https://www.rfc-editor.org/rfc/rfc7617.html

To receive authorization, the client
[...]
2. constructs the user-pass by concatenating the user-id, a single
colon (":") character, and the password,
[...]

Furthermore, a user-id containing a colon character is invalid, as
the first colon in a user-pass string separates user-id and password
from one another; text after the first colon is part of the password.
User-ids containing colons cannot be encoded in user-pass strings.

- URL-encoding and decoding is not part of the Basic HTTP Authentication Scheme.
- The user-id is not allowed to contain colons (`:`).
- The password is allowed to contain colons (`:`).

Quoting https://www.rfc-editor.org/rfc/rfc7617.html
>   To receive authorization, the client
>   [...]
>   2.  constructs the user-pass by concatenating the user-id, a single
>       colon (":") character, and the password,
>   [...]
>
>   Furthermore, a user-id containing a colon character is invalid, as
>   the first colon in a user-pass string separates user-id and password
>   from one another; text after the first colon is part of the password.
>   User-ids containing colons cannot be encoded in user-pass strings.

Signed-off-by: Ivan Kanakarakis <[email protected]>
@c00kiemon5ter
Copy link
Member Author

@rohe rohe merged commit 9bde482 into main Jun 2, 2022
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