[balsa] main: Sandbox all the webkit!



commit 2e2704f43b46be744ca4fbb23a5ea3bd98a98288
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Jun 16 19:46:51 2020 -0400

    main: Sandbox all the webkit!
    
    https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/Sandbox-all-the-WebKit!
    
    * src/main.c (balsa_startup_cb):

 ChangeLog  | 8 ++++++++
 src/main.c | 4 ++++
 2 files changed, 12 insertions(+)
---
diff --git a/ChangeLog b/ChangeLog
index d757291a2..522483731 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-06-16  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       main: Sandbox all the webkit
+
+       https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/Sandbox-all-the-WebKit!
+
+       * src/main.c (balsa_startup_cb):
+
 2020-06-13  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Various: Use GtkTreeView's "row-activated" signal instead of
diff --git a/src/main.c b/src/main.c
index 97de9d202..e55072ee3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -54,6 +54,7 @@
 
 #include "libbalsa-gpgme.h"
 #include "libbalsa-gpgme-cb.h"
+#include <webkit2/webkit2.h>
 
 /* We need separate variable for storing command line requests to check the
    mail because such selection cannot be stored in balsa_app and later
@@ -509,6 +510,9 @@ balsa_startup_cb(GApplication *application,
     GError *error = NULL;
 #endif
 
+    /* https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/Sandbox-all-the-WebKit! */
+    webkit_web_context_set_sandbox_enabled(webkit_web_context_get_default(), TRUE);
+
 #ifdef ENABLE_NLS
     /* Initialize the i18n stuff */
     bindtextdomain(PACKAGE, GNOMELOCALEDIR);


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