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: Parse does not parse username and password correctly #3439
Labels
Comments
Comment 1 by stephen@q5comm.com: I submitted a CL. http://golang.org/cl/5975050/ |
See RFC3986, section 3.2.1 for the expected format and section 2.3 for the list of unreserved characters. Your URL is invalid. By the way, to submit a CL, you should send it on the mailing-lint by running "hg mail" as explained on http://golang.org/doc/contribute.html Otherwise it's invisible. |
I know it's technically invalid, still that's what lots of url parsers too. One big example is Google Chrome, which makes request to hostname.com/path, and not something else. I would be ok if url.Parse returned an error in a case like that, btw. It's just splitting on the last "@" in authority is a lot easier. |
Yes, I think net/url should either clearly reject that URL, or parse it like other URL parsers. Full example: http://play.golang.org/p/ijPqsLnvtl Labels changed: added priority-soon, packagebug, removed priority-triage. Status changed to Accepted. |
I submitted a new CL at http://golang.org/cl/6206090, since a small change requested by rsc was not done by stephen for 1.5 months already. |
This issue was closed by revision f7277da. Status changed to Fixed. |
rsc
pushed a commit
that referenced
this issue
May 11, 2015
… authority ««« backport 89a9ef95c8db net/url: better parsing of urls with @ symbol in authority Fixes #3439 R=r, rsc, dsymonds, n13m3y3r CC=golang-dev https://golang.org/cl/6206090 »»»
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: