net/url: should Parse accept hostnames with leading hyphens? #19462
Labels
FrozenDueToAge
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
What version of Go are you using (
go version
)?What did you do?
I have tested with multiple invalid strings and found that
url.Parse()
andurl.ParseRequestURI()
allow invalid URL strings without an error.https://play.golang.org/p/_qvse6f4C9
What did you expect to see?
An Error.
-10:10
is not a URL, an IP 4/6, or a CIDR.What did you see instead?
net/url
allows invalid hostnamesThe text was updated successfully, but these errors were encountered: