You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
url.ParseQuery would throw the error invalid semicolon separator in query if it hadn't been suppressed.
You might find the relevant code change explanatory that introduces this behavior. net/url: reject query values with semicolons
A workaround might be: parsed.RawQuery = strings.ReplaceAll(parsed.RawQuery, ";", "%3b")
seankhliao
changed the title
affected/package: net/url: parseQuery() does not check for semicolon(;) in url
net/url: parseQuery() does not check for semicolon(;) in url
Sep 12, 2022
This is working as intended. net/url.Parse just stores net/url.URL.RawQuery which is only parsed on demand, either by net/url.URL.Query() (dropping malformed values) or net/url.ParseQuery() (reporting an error). Both are documented.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
expect
but in fact
A nil value is returned when the query URL contains a semicolon(
;
) characterWhat did you see instead?
semicolon(
;
) character is parsed into the value of the dictThe text was updated successfully, but these errors were encountered: