[geary/mjog/disable-webkit-gtk-sandbox-again] Components.WebView: Disable WebKitGTK sandboxing again




commit a5ce9d84343a8b9bac03dcf3ef7aee90f9fd2b1b
Author: Michael Gratton <mike vee net>
Date:   Sun Feb 7 18:22:52 2021 +1100

    Components.WebView: Disable WebKitGTK sandboxing again
    
    It breaks print-to-pdf, and the workaround effectively disables the
    sandbox.
    
    See #842 and https://bugs.webkit.org/show_bug.cgi?id=202363

 src/client/components/components-web-view.vala | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/client/components/components-web-view.vala b/src/client/components/components-web-view.vala
index a45d24223..e11a3f792 100644
--- a/src/client/components/components-web-view.vala
+++ b/src/client/components/components-web-view.vala
@@ -79,12 +79,16 @@ public abstract class Components.WebView : WebKit.WebView, Geary.BaseInterface {
                                         File cache_dir) {
         WebsiteDataManager data_manager = new WebsiteDataManager(cache_dir.get_path());
         WebKit.WebContext context = new WebKit.WebContext.with_website_data_manager(data_manager);
-        // Enable WebProcess sandboxing
-        context.add_path_to_sandbox(web_extension_dir.get_path(), true);
-        // Add the whole home directory otherwise print-to-PDF won't work.
-        // See https://bugs.webkit.org/show_bug.cgi?id=202363
-        context.add_path_to_sandbox(GLib.Environment.get_home_dir(), false);
-        context.set_sandbox_enabled(true);
+
+        // WebProcess sandboxing
+        //
+        // The sandbox is currently disabled since it breaks printing
+        // and saving as PDF. See:
+        // https://bugs.webkit.org/show_bug.cgi?id=202363
+        //
+        // context.add_path_to_sandbox(web_extension_dir.get_path(), true);
+        // context.set_sandbox_enabled(true);
+
         // Use the doc browser model so that we get some caching of
         // resources between email body loads.
         context.set_cache_model(WebKit.CacheModel.DOCUMENT_BROWSER);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]