Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 33c016a962ce9fde038b483ec6e3710a77138d0d
https://github.com/WebKit/WebKit/commit/33c016a962ce9fde038b483ec6e3710a77138d0d
Author: Charlie Wolfe <[email protected]>
Date: 2026-09-22 (Tue, 22 Sep 2026)
Changed paths:
M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
M TestExpectations/apitests
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/HSTS.mm
Log Message:
-----------
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/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.
Originally-landed-as: 316606.31@safari-7625-branch (b20bd1d173f7).
rdar://187506832
Canonical link: https://commits.webkit.org/321642@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications