[sushi/gnome-3-38] html: enable web process sandbox



commit 06785e4cdf7e77bb452a46d85439eb936b81d050
Author: Michael Catanzaro <mcatanzaro redhat com>
Date:   Wed Mar 30 20:14:31 2022 -0500

    html: enable web process sandbox
    
    See Initiatives#19. This was originally attempted in
    9ad31f72b4301666a7ac1b64632e60bd7a36da5d but it was added in the wrong
    place: we need to enable sandboxing exactly once, not once each time a
    new HTML previewer is created. This could be done anywhere, but keeping
    it with the HTMLRenderer class seems simplest, since this is the only
    place where sushi uses WebKit.

 src/viewers/html.js | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/src/viewers/html.js b/src/viewers/html.js
index 3de4455..985d957 100644
--- a/src/viewers/html.js
+++ b/src/viewers/html.js
@@ -60,6 +60,10 @@ var Klass = GObject.registerClass({
         this.isReady();
     }
 
+    static {
+        WebKit2.WebContext.get_default().set_sandbox_enabled(true);
+    }
+
     get moveOnClick() {
         return false;
     }


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