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

Decode user ID and password as URI components #22

Closed
wants to merge 1 commit into from

Conversation

OliverJAsh
Copy link

The user ID and password must be encoded in order to allow passwords that contain colons.

Would it be appropriate to encode them as URI components, thus escaping the colon if there is one anywhere in the credentials?

@jaredhanson
Copy link
Owner

I think #21 is the correct fix. The spec doesn't state that any encoding should be performed, so I don't think this would conform to the spec. Have you seen any guidance otherwise?

@OliverJAsh
Copy link
Author

@jaredhanson You're right. However, is there anything to say that the user ID won’t contain a colon?

@OliverJAsh
Copy link
Author

Interestingly it does specify userid = *<TEXT excluding ":">. Guess you can't use HTTP basic auth if your user IDs contain colons (or you'll have to encrypt it yourself).

In which case, I believe #21 is the correct fix. :-)

@OliverJAsh OliverJAsh closed this Jan 25, 2014
@jaredhanson
Copy link
Owner

Yeah, HTTP Basic auth leaves things a bit too open to interpretation for my mind. There are some specs from the early days of the Internet that define legal characters for usernames (and colon is not legal - IIRC, it's just alphanumerics, dash, and underscore). Obviously there are systems that don't respect this, which gives rise to this situation.

@OliverJAsh
Copy link
Author

Interesting, thanks. Hoping we can get #21 merged and released! :-)

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