Skip to content

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

Merged
rohe merged 2 commits intomainfrom
fix-op-parse-basic-auth
Jun 2, 2022
Merged

Fix parsing of Basic HTTP Authentication Scheme on the OP side#25
rohe merged 2 commits intomainfrom
fix-op-parse-basic-auth

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 <ivan.kanak@gmail.com>
@c00kiemon5ter
Copy link
Member Author

Signed-off-by: Ivan Kanakarakis <ivan.kanak@gmail.com>
@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