Title: [271537] trunk/Source/WebKit
- Revision
- 271537
- Author
- [email protected]
- Date
- 2021-01-15 14:58:01 -0800 (Fri, 15 Jan 2021)
Log Message
REGRESSION(r267763) Uploading zipped directories does not work on iOS
https://bugs.webkit.org/show_bug.cgi?id=220666
<rdar://problem/72940505>
Patch by Alex Christensen <[email protected]> on 2021-01-15
Reviewed by Geoffrey Garen.
r267763 removed indexedDatabaseTempBlobDirectoryExtensionHandle with no replacement, which used to give the network process
read/write access to /tmp inside the parent process's container. This seems to have been unused for IndexedDB, but it was used
by createTemporaryZipArchive when uploading directories, such as Pages, Numbers, and Keynote documents.
Unfortunately the unit test added by r248139 is macOS-only because WKOpenPanelParameters is only available on macOS and it would
require a large and risky amount of refactoring to add SPI on iOS to test this because iOS uses WKFileUploadPanel instead.
I did manually verify that the bug is fixed using my phone, though.
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (271536 => 271537)
--- trunk/Source/WebKit/ChangeLog 2021-01-15 22:54:07 UTC (rev 271536)
+++ trunk/Source/WebKit/ChangeLog 2021-01-15 22:58:01 UTC (rev 271537)
@@ -1,3 +1,28 @@
+2021-01-15 Alex Christensen <[email protected]>
+
+ REGRESSION(r267763) Uploading zipped directories does not work on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=220666
+ <rdar://problem/72940505>
+
+ Reviewed by Geoffrey Garen.
+
+ r267763 removed indexedDatabaseTempBlobDirectoryExtensionHandle with no replacement, which used to give the network process
+ read/write access to /tmp inside the parent process's container. This seems to have been unused for IndexedDB, but it was used
+ by createTemporaryZipArchive when uploading directories, such as Pages, Numbers, and Keynote documents.
+
+ Unfortunately the unit test added by r248139 is macOS-only because WKOpenPanelParameters is only available on macOS and it would
+ require a large and risky amount of refactoring to add SPI on iOS to test this because iOS uses WKFileUploadPanel instead.
+ I did manually verify that the bug is fixed using my phone, though.
+
+ * NetworkProcess/NetworkProcessCreationParameters.cpp:
+ (WebKit::NetworkProcessCreationParameters::encode const):
+ (WebKit::NetworkProcessCreationParameters::decode):
+ * NetworkProcess/NetworkProcessCreationParameters.h:
+ * NetworkProcess/cocoa/NetworkProcessCocoa.mm:
+ (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
+
2021-01-15 Chris Dumez <[email protected]>
[GPUProcess] Move DOM / Canvas rendering off the main thread in the GPUProcess
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp (271536 => 271537)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp 2021-01-15 22:54:07 UTC (rev 271536)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp 2021-01-15 22:58:01 UTC (rev 271537)
@@ -47,6 +47,7 @@
encoder << cookieStorageDirectoryExtensionHandle;
encoder << containerCachesDirectoryExtensionHandle;
encoder << parentBundleDirectoryExtensionHandle;
+ encoder << tempDirectoryExtensionHandle;
#endif
encoder << shouldSuppressMemoryPressureHandler;
encoder << urlSchemesRegisteredForCustomProtocols;
@@ -96,6 +97,12 @@
if (!parentBundleDirectoryExtensionHandle)
return false;
result.parentBundleDirectoryExtensionHandle = WTFMove(*parentBundleDirectoryExtensionHandle);
+
+ Optional<SandboxExtension::Handle> tempDirectoryExtensionHandle;
+ decoder >> tempDirectoryExtensionHandle;
+ if (!tempDirectoryExtensionHandle)
+ return false;
+ result.tempDirectoryExtensionHandle = WTFMove(*tempDirectoryExtensionHandle);
#endif
if (!decoder.decode(result.shouldSuppressMemoryPressureHandler))
return false;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h (271536 => 271537)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h 2021-01-15 22:54:07 UTC (rev 271536)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h 2021-01-15 22:58:01 UTC (rev 271537)
@@ -58,6 +58,7 @@
SandboxExtension::Handle cookieStorageDirectoryExtensionHandle;
SandboxExtension::Handle containerCachesDirectoryExtensionHandle;
SandboxExtension::Handle parentBundleDirectoryExtensionHandle;
+ SandboxExtension::Handle tempDirectoryExtensionHandle;
#endif
bool shouldSuppressMemoryPressureHandler { false };
Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm (271536 => 271537)
--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm 2021-01-15 22:54:07 UTC (rev 271536)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm 2021-01-15 22:58:01 UTC (rev 271537)
@@ -80,6 +80,7 @@
SandboxExtension::consumePermanently(parameters.cookieStorageDirectoryExtensionHandle);
SandboxExtension::consumePermanently(parameters.containerCachesDirectoryExtensionHandle);
SandboxExtension::consumePermanently(parameters.parentBundleDirectoryExtensionHandle);
+ SandboxExtension::consumePermanently(parameters.tempDirectoryExtensionHandle);
#endif
_CFNetworkSetATSContext(parameters.networkATSContext.get());
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (271536 => 271537)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2021-01-15 22:54:07 UTC (rev 271536)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2021-01-15 22:58:01 UTC (rev 271537)
@@ -156,6 +156,7 @@
SandboxExtension::createHandleForReadWriteDirectory(containerCachesDirectory, parameters.containerCachesDirectoryExtensionHandle);
if (String parentBundleDirectory = WebProcessPool::parentBundleDirectory(); !parentBundleDirectory.isEmpty())
SandboxExtension::createHandle(parentBundleDirectory, SandboxExtension::Type::ReadOnly, parameters.parentBundleDirectoryExtensionHandle);
+ SandboxExtension::createHandleForTemporaryFile(emptyString(), SandboxExtension::Type::ReadWrite, parameters.tempDirectoryExtensionHandle);
#endif
WebProcessPool::platformInitializeNetworkProcess(parameters);
send(Messages::NetworkProcess::InitializeNetworkProcess(parameters), 0);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes