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

net/url: UserInfo parse fail on '#' character #22195

Closed
rvolykh opened this issue Oct 10, 2017 · 2 comments
Closed

net/url: UserInfo parse fail on '#' character #22195

rvolykh opened this issue Oct 10, 2017 · 2 comments

Comments

@rvolykh
Copy link

rvolykh commented Oct 10, 2017

There is problem with url.Parse. According to https://tools.ietf.org/html/rfc3986:

reserved      = gen-delims / sub-delims
gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims  = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="

UserInfo should respect '#' character: https://tools.ietf.org/html/rfc3986#section-3.2.1

What version of Go are you using (go version)?

1.8.3

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOHOSTARCH="amd64"
GOOS="linux"

What did you do?

https://play.golang.org/p/QtAItGCPez

What did you expect to see?

username:pass#word

What did you see instead?

<nil>

@ghost
Copy link

ghost commented Oct 10, 2017

I don't think you are reading that correctly. The spec defines userinfo as:

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

Note unreserved.

@rvolykh
Copy link
Author

rvolykh commented Oct 10, 2017

Thanks for your quick answer
Yes, I've really messed up here

@rvolykh rvolykh closed this as completed Oct 10, 2017
@golang golang locked and limited conversation to collaborators Oct 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants