net/url: url.Parse() does not allow /
in http basic auth password
#72013
Labels
BugReport
Issues describing a possible bug in the Go implementation.
Go version
go version go1.23.4 linux/amd64
Output of
go env
in your module/workspace:What did you do?
rfc2617 specifies that the password when using http basic auth is base64 encoded: https://datatracker.ietf.org/doc/html/rfc2617#page-5. base64 may use
/
: https://datatracker.ietf.org/doc/html/rfc2045#page-25This example fails with
parse "kafka://foo:b/ar@hostname.org:9094": invalid port ":b" after host
:https://go.dev/play/p/aodJzgziUVo
What did you see happen?
Part of the base64 password was treated as the port number.
What did you expect to see?
The example url
"kafka://foo:b/ar@hostname.org:9094"
is successfully parsed.The text was updated successfully, but these errors were encountered: