Blame SOURCES/enable-sandbox.patch

871fa1
From 87e5db488d509fb3f88fdd5aed3d58afcc930814 Mon Sep 17 00:00:00 2001
871fa1
From: Felipe Borges <felipeborges@gnome.org>
871fa1
Date: Mon, 4 Apr 2022 10:06:07 +0200
871fa1
Subject: [PATCH] Enable webkit sandbox on GApplication.startup
871fa1
871fa1
This needs to be done only once, so this is a good place for it.
871fa1
871fa1
In commit 3fcb670f7385 we enabled it using Gjs "static" syntax, which
871fa1
is not available in Gjs versions older than 1.71.1.
871fa1
https://gitlab.gnome.org/GNOME/gjs/-/blob/70552bee79f644836a5e9f9a54845791b1ef7a94/NEWS#L67
871fa1
871fa1
Let's enable it on GApplication.startup for GNOME 41.
871fa1
871fa1
Fixes #81
871fa1
---
871fa1
 src/ui/application.js | 3 +++
871fa1
 1 file changed, 3 insertions(+)
871fa1
871fa1
diff --git a/src/ui/application.js b/src/ui/application.js
871fa1
index 53fe2b4..f84a9bc 100644
871fa1
--- a/src/ui/application.js
871fa1
+++ b/src/ui/application.js
871fa1
@@ -85,6 +85,9 @@ var Application = GObject.registerClass(class Application extends Gtk.Applicatio
871fa1
     vfunc_startup() {
871fa1
         super.vfunc_startup();
871fa1
 
871fa1
+        // Enable web process sandbox
871fa1
+        WebKit2.WebContext.get_default().set_sandbox_enabled(true);
871fa1
+
871fa1
         this._defineStyleAndThemes();
871fa1
     }
871fa1
 
871fa1
-- 
871fa1
GitLab
871fa1