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

Improve handling of Basic Auth passwords (colons) #37

Merged
merged 1 commit into from
Nov 26, 2015
Merged

Improve handling of Basic Auth passwords (colons) #37

merged 1 commit into from
Nov 26, 2015

Conversation

punkeel
Copy link

@punkeel punkeel commented Nov 25, 2015

In order to respect RFC 2617, the server must accept any password matching the following requirements:

      user-pass   = userid ":" password
      userid      = *<TEXT excluding ":">
      password    = *TEXT

The former implementation did not respect this, and did not take in account the : character in the password field.

The new implementation assumes that the usernames ends when the colon is found (so it can't contain one), and uses the other part
of the token as the password.

In order to respect RFC 2617, the app must accept any password matching the following requirements:
```
      user-pass   = userid ":" password
      userid      = *<TEXT excluding ":">
      password    = *TEXT
```

The former implementation did not respect this, and did not take in account the `:` character in the password field.

The new implementation assumes that the usernames ends when the colon is found (so it can't contain one), and uses the other part
of the token as the password.
@punkeel
Copy link
Author

punkeel commented Nov 25, 2015

Linked issue: #36

@punkeel
Copy link
Author

punkeel commented Nov 25, 2015

NB: Travis failed because it's not up to date, but that's not the point of this PR, so it won't be fixed.

@benel
Copy link
Member

benel commented Nov 25, 2015

Thank you very much for contributing.

@benel benel merged commit 729708e into Hypertopic:master Nov 26, 2015
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