Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ecb5a7bf75001294439b9cd83cbdabaac8fd9ac2
https://github.com/WebKit/WebKit/commit/ecb5a7bf75001294439b9cd83cbdabaac8fd9ac2
Author: Charlie Wolfe <[email protected]>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.h
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/LoadWebArchive.mm
Log Message:
-----------
isQuarantinedAndNotUserApproved() should use the parsed file URL instead of
re-parsing the path
https://bugs.webkit.org/show_bug.cgi?id=318271
rdar://178108374
Reviewed by Alex Christensen.
isQuarantinedAndNotUserApproved() took a string and re-parsed it with -[NSURL
initWithString:],
while its caller had already resolved the file via URL::fileSystemPath(). The
two representations
disagreed for file names containing characters such as '#', which
initWithString: interprets as the
start of a URL fragment: the path was truncated and the ".webarchive" extension
check no longer
matched, so the file's quarantine state was not evaluated against the correct
path.
Pass the already-parsed URL through to isQuarantinedAndNotUserApproved() and
derive the on-disk path
from it with -[NSURL initFileURLWithPath:], so the extension check and the
quarantine lookup operate
on the same file as the caller.
Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/LoadWebArchive.mm
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::isQuarantinedAndNotUserApproved):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::updateDataStoreForWebArchiveLoad):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/mac/LoadWebArchive.mm:
(TestWebKitAPI::TEST(LoadWebArchive, QuarantinedWebArchiveWithFragmentInName)):
Canonical link: https://commits.webkit.org/317101@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications