Branch: refs/heads/webkitglib/2.54
  Home:   https://github.com/WebKit/WebKit
  Commit: be1e3e8e6ae6d4dadc730df88cde1457621d0ad4
      
https://github.com/WebKit/WebKit/commit/be1e3e8e6ae6d4dadc730df88cde1457621d0ad4
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-09-15 (Tue, 15 Sep 2026)

  Changed paths:
    M Source/WebCore/platform/network/NetworkStorageSession.h
    M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
    M TestExpectations/apitests
    M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/HSTS.mm

  Log Message:
  -----------
  Cherry-pick 316606.31@safari-7625-branch (b20bd1d173f7). 
https://bugs.webkit.org/show_bug.cgi?id=318760

Partition HSTS for third parties when partitioned cookies are allowed
https://bugs.webkit.org/show_bug.cgi?id=318760
rdar://143715095

Reviewed by Matthew Finkel.

HSTS is partitioned for third parties to avoid allowing webpages to query the 
HSTS global cache.
That decision was gated on `shouldBlockCookies()`, which is only true when the 
third-party cookie
blocking decision is `All`. Since CHIPS became the default, a third party now 
resolves to
`AllExceptPartitioned`, so HSTS stopped being partitioned. `maxAgeCacheCap` was 
already updated for
this, but the HSTS handlers weren't.

Gate the HSTS downgrade on the full cookie blocking decision being anything 
other than `None` (i.e.
blocked or partitioned), matching `maxAgeCacheCap`.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/HSTS.mm

* Source/WebCore/platform/network/NetworkStorageSession.h:
* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate 
URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:]):
(-[WKNetworkSessionDelegate 
URLSession:task:_schemeUpgraded:completionHandler:]):
* TestExpectations/apitests:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/HSTS.mm:
(TestWebKitAPI::TEST(HSTS, ThirdPartyFetch)):
(TestWebKitAPI::TEST(HSTS, ThirdParty)):
(TestWebKitAPI::TEST(HSTS, DISABLED_ThirdPartyFetch)): Deleted.
(TestWebKitAPI::TEST(HSTS, DISABLED_ThirdParty)): Deleted.

Identifier: 316606.31@safari-7625-branch
Canonical link: https://commits.webkit.org/317695.319@webkitglib/2.54



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

Reply via email to