Bug 247365 - [Content Extensions] QueryTransforms should not unconditionally redirect to form-encoded URLs
Summary: [Content Extensions] QueryTransforms should not unconditionally redirect to f...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-02 08:49 PDT by Wenson Hsieh
Modified: 2022-11-02 17:19 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2022-11-02 08:49:40 PDT
Currently, anything that passes through `RedirectAction::URLTransformAction::QueryTransform::applyToURL` gets unconditionally form-encoded (e.g. "=" -> "%20"), regardless of whether any rules actually matched.

This is because we always transform the query through `URLParser::parseURLEncodedForm`, and set the transformed URL query to the result, even if no parameters were removed/replaced/added.

For both performance and correctness, it probably makes sense to allow query parameters to pass through in their original form, if no rules matched.
Comment 1 Wenson Hsieh 2022-11-02 12:53:19 PDT
Pull request: https://github.com/WebKit/WebKit/pull/6045
Comment 2 EWS 2022-11-02 17:15:58 PDT
Committed 256260@main (b60c1a321a03): <https://commits.webkit.org/256260@main>

Reviewed commits have been landed. Closing PR #6045 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2022-11-02 17:19:12 PDT
<rdar://problem/101887185>