[sushi/mcatanzaro/sandbox] html: enable web process sandbox
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi/mcatanzaro/sandbox] html: enable web process sandbox
- Date: Thu, 31 Mar 2022 01:16:59 +0000 (UTC)
commit 0039c192c0aa9fc431fb17effdaae7952b730d86
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]