fix: stop treating semicolons as query parameter separators#787
Open
veeceey wants to merge 1 commit intogorilla:mainfrom
Open
fix: stop treating semicolons as query parameter separators#787veeceey wants to merge 1 commit intogorilla:mainfrom
veeceey wants to merge 1 commit intogorilla:mainfrom
Conversation
Since Go 1.17, net/url.ParseQuery no longer splits query parameters on semicolons, in compliance with the URL Living Standard. However, findFirstQueryKey still used bytes.IndexAny(foundKey, "&;") which split on both ampersands and semicolons. This created a parser differential between mux.Vars and net/url that could lead to security vulnerabilities such as broken access control and web cache poisoning. Change bytes.IndexAny(foundKey, "&;") to bytes.IndexByte(foundKey, '&') so that only ampersands are recognized as separators. Fixes gorilla#781 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
Friendly ping - any chance someone could take a look at this when they get a chance? Happy to make any changes if needed. |
Author
|
just wanted to follow up on this — is there anything blocking it from getting reviewed? |
epaes90
reviewed
Mar 14, 2026
epaes90
left a comment
There was a problem hiding this comment.
Argus Code Review
Score: 100/100
Reviewed 2 files with no issues found. Highlights: Test coverage is present; Changes are focused and well-scoped; No security, performance, or quality issues detected. Score: 100/100.
No inline findings to report.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.