Closed Bug 1742598 Opened 6 months ago Closed 6 months ago

Don't apply URL encoding when query stripping happens

Categories

(Core :: Privacy: Anti-Tracking, defect, P1)

defect

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: timhuang, Assigned: timhuang)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

We will encode the URL query string when query stripping happens. This would end with an encoded URL string in the URL which doesn't match the behavior without query stripping. We shouldn't encode the URL query string when query stripping happens.

The URL query stripping doesn't want the URLParams::Serialize() to
encode the result because it will encode the unstripped parameters. This
will change the unstripped parameters once stripping was happened.

Therefore, we introduce an parameter to URLParams::Serialize() to
disable encoding.

Pushed by tihuang@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/76ba18f48c8b
Part 1: Add an parameter to URLParams::Serialize() to indicate if the encoding is needed for the serialization result. r=smaug,necko-reviewers,dragana
https://hg.mozilla.org/integration/autoland/rev/4bb21b3b37d1
Part 2: Add a test to ensure we don't encode query parameter after query stripping. r=dimi
Regressions: 1742988
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.