Title: [273988] branches/safari-612.1.5-branch/Source/WebKit
- Revision
- 273988
- Author
- [email protected]
- Date
- 2021-03-05 11:51:15 -0800 (Fri, 05 Mar 2021)
Log Message
Cherry-pick r273286. rdar://problem/75101889
[Cocoa] Send sandbox extensions for Network Extension services in load parameters
https://bugs.webkit.org/show_bug.cgi?id=222284
<rdar://problem/74402532>
Reviewed by Brent Fulgham.
Currently, sandbox extensions for Network Extension services are sent from the UI process to the WebContent process when the
policy decision is made, but that is not soon enough in all cases. They should also be sent as part of the load parameters.
* Shared/Cocoa/LoadParametersCocoa.mm:
(WebKit::LoadParameters::platformEncode const):
(WebKit::LoadParameters::platformDecode):
* Shared/LoadParameters.h:
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::addPlatformLoadParameters):
* WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::platformDidReceiveLoadParameters):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-612.1.5-branch/Source/WebKit/ChangeLog (273987 => 273988)
--- branches/safari-612.1.5-branch/Source/WebKit/ChangeLog 2021-03-05 19:49:55 UTC (rev 273987)
+++ branches/safari-612.1.5-branch/Source/WebKit/ChangeLog 2021-03-05 19:51:15 UTC (rev 273988)
@@ -1,3 +1,48 @@
+2021-03-05 Ruben Turcios <[email protected]>
+
+ Cherry-pick r273286. rdar://problem/75101889
+
+ [Cocoa] Send sandbox extensions for Network Extension services in load parameters
+ https://bugs.webkit.org/show_bug.cgi?id=222284
+ <rdar://problem/74402532>
+
+ Reviewed by Brent Fulgham.
+
+ Currently, sandbox extensions for Network Extension services are sent from the UI process to the WebContent process when the
+ policy decision is made, but that is not soon enough in all cases. They should also be sent as part of the load parameters.
+
+ * Shared/Cocoa/LoadParametersCocoa.mm:
+ (WebKit::LoadParameters::platformEncode const):
+ (WebKit::LoadParameters::platformDecode):
+ * Shared/LoadParameters.h:
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::addPlatformLoadParameters):
+ * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
+ (WebKit::WebPage::platformDidReceiveLoadParameters):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-02-22 Per Arne Vollan <[email protected]>
+
+ [Cocoa] Send sandbox extensions for Network Extension services in load parameters
+ https://bugs.webkit.org/show_bug.cgi?id=222284
+ <rdar://problem/74402532>
+
+ Reviewed by Brent Fulgham.
+
+ Currently, sandbox extensions for Network Extension services are sent from the UI process to the WebContent process when the
+ policy decision is made, but that is not soon enough in all cases. They should also be sent as part of the load parameters.
+
+ * Shared/Cocoa/LoadParametersCocoa.mm:
+ (WebKit::LoadParameters::platformEncode const):
+ (WebKit::LoadParameters::platformDecode):
+ * Shared/LoadParameters.h:
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::addPlatformLoadParameters):
+ * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
+ (WebKit::WebPage::platformDidReceiveLoadParameters):
+
2021-03-04 Alan Coon <[email protected]>
Cherry-pick r273485. rdar://problem/75075088
Modified: branches/safari-612.1.5-branch/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm (273987 => 273988)
--- branches/safari-612.1.5-branch/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm 2021-03-05 19:49:55 UTC (rev 273987)
+++ branches/safari-612.1.5-branch/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm 2021-03-05 19:51:15 UTC (rev 273988)
@@ -37,6 +37,7 @@
{
IPC::encode(encoder, dataDetectionContext.get());
+ encoder << networkExtensionSandboxExtensionHandles;
#if PLATFORM(IOS)
encoder << contentFilterExtensionHandle;
encoder << frontboardServiceExtensionHandle;
@@ -48,6 +49,12 @@
if (!IPC::decode(decoder, parameters.dataDetectionContext))
return false;
+ Optional<SandboxExtension::HandleArray> networkExtensionSandboxExtensionHandles;
+ decoder >> networkExtensionSandboxExtensionHandles;
+ if (!networkExtensionSandboxExtensionHandles)
+ return false;
+ parameters.networkExtensionSandboxExtensionHandles = WTFMove(*networkExtensionSandboxExtensionHandles);
+
#if PLATFORM(IOS)
Optional<Optional<SandboxExtension::Handle>> contentFilterExtensionHandle;
decoder >> contentFilterExtensionHandle;
Modified: branches/safari-612.1.5-branch/Source/WebKit/Shared/LoadParameters.h (273987 => 273988)
--- branches/safari-612.1.5-branch/Source/WebKit/Shared/LoadParameters.h 2021-03-05 19:49:55 UTC (rev 273987)
+++ branches/safari-612.1.5-branch/Source/WebKit/Shared/LoadParameters.h 2021-03-05 19:51:15 UTC (rev 273988)
@@ -74,6 +74,7 @@
#if PLATFORM(COCOA)
RetainPtr<NSDictionary> dataDetectionContext;
+ SandboxExtension::HandleArray networkExtensionSandboxExtensionHandles;
#endif
#if PLATFORM(IOS)
Optional<SandboxExtension::Handle> contentFilterExtensionHandle;
Modified: branches/safari-612.1.5-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (273987 => 273988)
--- branches/safari-612.1.5-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2021-03-05 19:49:55 UTC (rev 273987)
+++ branches/safari-612.1.5-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2021-03-05 19:51:15 UTC (rev 273988)
@@ -166,6 +166,8 @@
{
loadParameters.dataDetectionContext = m_uiClient->dataDetectionContext();
+ loadParameters.networkExtensionSandboxExtensionHandles = createNetworkExtensionsSandboxExtensions(process);
+
#if PLATFORM(IOS)
if (!process.hasManagedSessionSandboxAccess() && [getWebFilterEvaluatorClass() isManagedSession]) {
SandboxExtension::Handle handle;
Modified: branches/safari-612.1.5-branch/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm (273987 => 273988)
--- branches/safari-612.1.5-branch/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm 2021-03-05 19:49:55 UTC (rev 273987)
+++ branches/safari-612.1.5-branch/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm 2021-03-05 19:51:15 UTC (rev 273988)
@@ -81,6 +81,8 @@
m_dataDetectionContext = parameters.dataDetectionContext;
+ consumeNetworkExtensionSandboxExtensions(parameters.networkExtensionSandboxExtensionHandles);
+
#if PLATFORM(IOS)
if (parameters.contentFilterExtensionHandle)
SandboxExtension::consumePermanently(*parameters.contentFilterExtensionHandle);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes