[shotwell] plugins: Sandbox WebkitGtk



commit 4906cf46ee43cba0a1ee162d9ea20732e871dab6
Author: Jens Georg <mail jensge org>
Date:   Tue Jun 30 09:07:18 2020 +0200

    plugins: Sandbox WebkitGtk
    
    Implements #260

 meson.build                               | 2 +-
 plugins/common/WebAuthenticationPane.vala | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/meson.build b/meson.build
index fd40ad4d..145fcda9 100644
--- a/meson.build
+++ b/meson.build
@@ -49,7 +49,7 @@ gio = dependency('gio-2.0', version: '>= 2.40')
 gmodule = dependency('gmodule-2.0', version: '>= 2.40')
 gio_unix = dependency('gio-unix-2.0', version: '>= 2.40')
 gee = dependency('gee-0.8', version: '>= 0.8.5')
-webkit = dependency('webkit2gtk-4.0', version: '>= 2.4')
+webkit = dependency('webkit2gtk-4.0', version: '>= 2.26')
 soup = dependency('libsoup-2.4')
 json_glib = dependency('json-glib-1.0')
 xml = dependency('libxml-2.0')
diff --git a/plugins/common/WebAuthenticationPane.vala b/plugins/common/WebAuthenticationPane.vala
index 669e3395..02cffb2b 100644
--- a/plugins/common/WebAuthenticationPane.vala
+++ b/plugins/common/WebAuthenticationPane.vala
@@ -30,6 +30,10 @@ namespace Shotwell.Plugins.Common {
 
         public override void constructed () {
             base.constructed ();
+            var ctx = WebKit.WebContext.get_default();
+            if (!ctx.get_sandbox_enabled()) {
+                ctx.set_sandbox_enabled(true);
+            }
 
             var box = new Gtk.Box(Gtk.Orientation.VERTICAL, 4);
             this.widget = box;


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