[sushi/sandbox-webkit: 3/3] html: Sandbox WebKit




commit 9ad31f72b4301666a7ac1b64632e60bd7a36da5d
Author: Felipe Borges <felipeborges gnome org>
Date:   Wed Oct 7 13:17:32 2020 +0200

    html: Sandbox WebKit
    
    https://gitlab.gnome.org/GNOME/Initiatives/-/issues/19

 src/viewers/html.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/viewers/html.js b/src/viewers/html.js
index a20d55d..fc0124d 100644
--- a/src/viewers/html.js
+++ b/src/viewers/html.js
@@ -41,6 +41,9 @@ var Klass = GObject.registerClass({
     _init(file) {
         super._init();
 
+        let webContext = WebKit2.WebContext.get_default();
+        webContext.set_sandbox_enabled(true);
+
         /* disable the default context menu of the web view */
         this.connect('context-menu',
                      function() {return true;});


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