Bug 247365

Summary: [Content Extensions] QueryTransforms should not unconditionally redirect to form-encoded URLs
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: PlatformAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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>