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

Support userinfo with empty username but non-empty password #292

Closed
mika-fischer opened this issue Apr 26, 2016 · 1 comment
Closed

Support userinfo with empty username but non-empty password #292

mika-fischer opened this issue Apr 26, 2016 · 1 comment

Comments

@mika-fischer
Copy link
Contributor

URIs like foo://:pwd@host are parsed correctly, i.e. _parts contains the correct info. But both userinfo() and toString() first check if username is set and ignore the password if username is empty.

@rodneyrehm
Copy link
Member

Neither 3.2.1. User Information nor the ABNF (below) indicates the username requirement, so this is a bug.

userinfo      = *( unreserved / pct-encoded / sub-delims / ":" )

The entire <username>:<password> scheme seems to be an unspecified semantic, even though 7.5. Sensitive Information is warning not to expose secret data in URLs.

Anyway, to fix your particular issue you'll want to look at URI.buildUserinfo() and its test. PR welcome :)

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

No branches or pull requests

2 participants