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

Not able to login after attempting without user name #1140

Closed
kpdecker opened this issue Nov 12, 2013 · 3 comments
Closed

Not able to login after attempting without user name #1140

kpdecker opened this issue Nov 12, 2013 · 3 comments
Assignees
Labels
bug Bug or defect
Milestone

Comments

@kpdecker
Copy link
Contributor

When attempting basic auth, if the user does not enter a user name they will never be able to log in under chrome as the 400 response does not appear to invalidate the entered credentials for Chrome.

I haven't had a chance to read into the spec to see what the defined behavior should be but this seems like a case that we should make chrome happy even if it's interpretation of the spec is incorrect.

Also it seems like there is value to being able to enter the empty string for the basic auth username so perhaps the framework should not validate this and leave it to the validateFunc to manage.

@ghost ghost assigned hueniverse Nov 15, 2013
@hueniverse
Copy link
Contributor

Added a flag for Basic allowEmptyUsername which is false by default as the safer option.

@kpdecker
Copy link
Contributor Author

What is the new response code if the user enters empty and it's rejected?

@hueniverse
Copy link
Contributor

It's 400 but should be changed to 401. I'll open an issue.

jmonster pushed a commit to jmonster/hapi that referenced this issue Feb 10, 2014
@lock lock bot locked as resolved and limited conversation to collaborators Jan 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bug or defect
Projects
None yet
Development

No branches or pull requests

2 participants