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: func parse(rawURL string, viaRequest bool) (*URL, error) #63280

Closed
tibetsam opened this issue Sep 28, 2023 · 6 comments
Closed

net/url: func parse(rawURL string, viaRequest bool) (*URL, error) #63280

tibetsam opened this issue Sep 28, 2023 · 6 comments
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@tibetsam
Copy link

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

go 1.21

Does this issue reproduce with the latest release?

Yes

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

go env Output
[$ go env](https://go.dev/play/)

What did you do?

https://go.dev/play/p/njAfwJZKrXZ

What did you expect to see?

https://www.rfc-editor.org/rfc/rfc1738.html
user = *[ uchar | ";" | "?" | "&" | "=" ]
password = *[ uchar | ";" | "?" | "&" | "=" ]

What did you see instead?

invalid port ":p" after host

@bcmills bcmills changed the title affected/package: net/url func parse(rawURL string, viaRequest bool) (*URL, error) net/url: func parse(rawURL string, viaRequest bool) (*URL, error) Sep 28, 2023
@bcmills
Copy link
Contributor

bcmills commented Sep 28, 2023

RFC 1738 defines:

uchar          = unreserved | escape

But : is in the reserved class — the opposite of unreserved. As far as I cal tell, the behavior of url.Parse in this case matches the RFC.

@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 28, 2023
@tibetsam
Copy link
Author

but it's an or operation
password = *[ uchar | ";" | "?" | "&" | "=" ]

@bcmills
Copy link
Contributor

bcmills commented Sep 28, 2023

The character : is not in that list.

@bcmills bcmills added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Sep 28, 2023
@tibetsam
Copy link
Author

tibetsam commented Sep 28, 2023 via email

@seankhliao
Copy link
Member

we use RFC 3986, not 1738
https://www.rfc-editor.org/rfc/rfc3986.html#section-3.2.1

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2023
@tibetsam
Copy link
Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants