Repository navigation
querystring: fix value decoding after encoded keys - #66553
Open
vedchaudhari wants to merge 1 commit into
Open
vedchaudhari wants to merge 1 commit into
vedchaudhari wants to merge 1 commit into
Conversation
In the non-default parse() path, a key with more than one percent escape could corrupt non-ASCII characters in its value. Keep key characters out of the value's encoding check. Assisted-by: claude:opus-5.5 Signed-off-by: vedchaudhari <vedc2853@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #66553 +/- ##
==========================================
- Coverage 90.40% 90.40% -0.01%
==========================================
Files 791 791
Lines 276226 276227 +1
Branches 53045 53044 -1
==========================================
- Hits 249732 249731 -1
- Misses 16899 16903 +4
+ Partials 9595 9593 -2
🚀 New features to boost your workflow:
|
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.
When
querystring.parse()uses the general parse path, a key with more than one percent escape can corrupt non-ASCII characters in the value:After the first escape, the remaining key characters fall through to the value's
%XXcheck and setvalEncoded. Moving thecontinueto the end of the key block fixes this.Plain
qs.parse(s)uses the fast path from #66175 and is not affected, butqs.parse(s, null, null)is, so the two return different results onmain.Added a regression test; querystring/url tests and
make lint-jspass.Refs: #66175
Assisted-by: Claude Code (Claude Opus 5.5)