summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@redhat.com>2023-01-19 20:14:48 -0600
committerMarge Bot <marge-bot@gnome.org>2023-01-20 19:35:40 +0000
commit4d70e2047e2330d75896b50030b30d34a72c277d (patch)
treeb181a7f823cbbdc30b27b4b91e64155a5ea074ba
parent467fa6ed0a8c979c5d06c39279c83a16bf7cfe87 (diff)
downloadepiphany-4d70e2047e2330d75896b50030b30d34a72c277d.tar.gz
Update for removal of WebKitGTK sandbox API
The sandbox is now mandatory. Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1266>
-rw-r--r--embed/ephy-embed-shell.c2
-rw-r--r--src/webextension/ephy-web-extension-manager.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c
index 1270f8a67..68200b9bb 100644
--- a/embed/ephy-embed-shell.c
+++ b/embed/ephy-embed-shell.c
@@ -893,7 +893,9 @@ ephy_embed_shell_startup (GApplication *application)
webkit_web_context_set_process_model (priv->web_context, WEBKIT_PROCESS_MODEL_MULTIPLE_SECONDARY_PROCESSES);
+#if !WEBKIT_CHECK_VERSION (2, 39, 5)
webkit_web_context_set_sandbox_enabled (priv->web_context, TRUE);
+#endif
webkit_web_context_add_path_to_sandbox (priv->web_context, ephy_profile_dir (), TRUE);
webkit_web_context_add_path_to_sandbox (priv->web_context, ephy_cache_dir (), TRUE);
webkit_web_context_add_path_to_sandbox (priv->web_context, ephy_config_dir (), TRUE);
diff --git a/src/webextension/ephy-web-extension-manager.c b/src/webextension/ephy-web-extension-manager.c
index bea08c27a..f0f0f8afe 100644
--- a/src/webextension/ephy-web-extension-manager.c
+++ b/src/webextension/ephy-web-extension-manager.c
@@ -1029,7 +1029,9 @@ ephy_web_extensions_manager_create_web_extensions_webview (EphyWebExtension *web
data_manager = webkit_web_context_get_website_data_manager (ephy_embed_shell_get_web_context (ephy_embed_shell_get_default ()));
web_context = webkit_web_context_new_with_website_data_manager (data_manager);
+#if !WEBKIT_CHECK_VERSION (2, 39, 5)
webkit_web_context_set_sandbox_enabled (web_context, TRUE);
+#endif
webkit_web_context_register_uri_scheme (web_context, "ephy-webextension", ephy_webextension_scheme_cb, web_extension, NULL);
webkit_security_manager_register_uri_scheme_as_secure (webkit_web_context_get_security_manager (web_context),