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

Authorization tokens force a non-blank username #289

Closed
Roy-Orbison opened this issue Mar 1, 2021 · 4 comments · Fixed by #296
Closed

Authorization tokens force a non-blank username #289

Roy-Orbison opened this issue Mar 1, 2021 · 4 comments · Fixed by #296

Comments

@Roy-Orbison
Copy link

I know APIs exist where the user must be blank and only the password is used to identify and authenticate the user. I would assume that there also exist some that are the converse (empty pass + token in username). Disallowing the empty string seems like an unnecessary restriction, and would be better handled with a warning to confirm upon save.

@frigus02
Copy link
Owner

frigus02 commented Mar 1, 2021

Hi. Thanks for opening an issue about this. I agree with you. It's probably best to make both fields optional. We could show a warning, but I'm not even sure if that's necessary.

Do you know how an empty username/password looks like in the header? Are they just treated as empty strings?

  • Empty username & password=secret 👉 base64(":secret") 👉 Authorization: Basic OnNlY3JldA==
  • Username=user & empty password 👉 base64("user:") 👉 Authorization: Basic dXNlcjo=

@frigus02
Copy link
Owner

frigus02 commented Mar 1, 2021

Oh yeah, the empty password case works exactly like that at the moment. So I assume the empty username case will work the same way.

@Roy-Orbison
Copy link
Author

Roy-Orbison commented Mar 1, 2021

Yeah, empty strings. The colon is always included so it can be decoded and tokenised by standard tools.

@frigus02
Copy link
Owner

frigus02 commented Mar 5, 2021

I uploaded version 4.4.0, which makes the username optional. Should be available in the next hours. Thanks again for reporting.

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 a pull request may close this issue.

2 participants