fix(rules): preserve equals signs in query parameter values - #122
Open
jashkarangiya wants to merge 1 commit into
Open
jashkarangiya wants to merge 1 commit into
jashkarangiya wants to merge 1 commit into
Conversation
|
|
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.
Closes #121
📜 Summary of changes:
Query parameter parsing previously split on every equals sign and kept only the first part of the value. That changed
token=abc==intotoken=abcwhenever a rule rebuilt the URL.This updates the parser to split on the first equals sign and preserve the rest of the value. Key-only parameters such as
?debugare also kept as key-only parameters.Regression coverage checks both paths that exposed the bug:
🎥 Demo Video:
Video/Demo: Not applicable. This is a parser-only fix with no UI change.
✅ Checklist:
🧪 Test instructions:
The production rule-processor build passes with
npm run buildfromcommon/rule-processor.Direct checks against the generated bundle pass for:
added=2tohttps://example.com?token=abc==&remove=1.removefrom the same URL.The full Karma suite is not marked as passing. It fails in the same way on untouched upstream
masterbecause of the existing shared-constants initialization problem.🔗 Other references: