Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 45aa35f10fac1e8d341e3e7992fe0aba457df743
      
https://github.com/WebKit/WebKit/commit/45aa35f10fac1e8d341e3e7992fe0aba457df743
  Author: Matthew Finkel <[email protected]>
  Date:   2026-02-13 (Fri, 13 Feb 2026)

  Changed paths:
    M Source/WebCore/loader/PolicyChecker.cpp
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
    M Tools/TestWebKitAPI/Tests/WebKit/AdvancedPrivacyProtections.mm

  Log Message:
  -----------
  Filter query parameter before decidePolicyForNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=307754
rdar://170292343

Reviewed by Wenson Hsieh.

Currently, query parameters are filtered from a cross-site navigational URL
relatively early in the load process. However, there is an edge case where this 
fails when
  1) we only filter parameters based on the source web page, and
  2) we handle a redirect that results in a process-swap

When we have this case, then the current document's URL doesn't reflect the
actual source document's URL (after PSON). I could solve this by plumbing the
originator/initiator, but instead I decided to filter the request URL before we
potentially PSON.

Test: Tools/TestWebKitAPI/Tests/WebKit/AdvancedPrivacyProtections.mm

* Source/WebCore/loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::checkNavigationPolicy):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::applyLinkDecorationFilteringWithResult):
* Tools/TestWebKitAPI/Tests/WebKit/AdvancedPrivacyProtections.mm:
(TestWebKitAPI::TEST(AdvancedPrivacyProtections, 
ConsistentlyFilterQueryParametersOnSource)):
(TestWebKitAPI::TEST(AdvancedPrivacyProtections, 
ConsistentlyFilterQueryParametersOnSourceAfterRedirect)):

Canonical link: https://commits.webkit.org/307522@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to