diff options
author | Michael Catanzaro <mcatanzaro@gnome.org> | 2021-02-03 16:52:08 -0600 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@gnome.org> | 2021-02-03 23:02:56 +0000 |
commit | 94e18ebee7789937d2eec6b73a9746c745b05447 (patch) | |
tree | aca751b056875c332f15eaf7fb70cffe6a3ad1c9 | |
parent | 3475a67a15328772edb91bc91b28826c81adba02 (diff) | |
download | epiphany-mcatanzaro/webextension-guid.tar.gz |
Web process extension must always create a custom script worldmcatanzaro/webextension-guid
This code is currently unreachable beacuse guid is always sent when
initializing the web process. But if it were not unreachable, it would
be a major security issue, because Epiphany internal APIs would be
exposed to the web. So let's remove this.
I think this was maybe a leftover from an earlier draft of the
WebExtension branch that perhaps attempted to use a separate
EphyWebProcessExtension for each WebExtension? Regardless, it's not
going to work.
-rw-r--r-- | embed/web-process-extension/ephy-web-process-extension.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/embed/web-process-extension/ephy-web-process-extension.c b/embed/web-process-extension/ephy-web-process-extension.c index de1cd6302..429f961bb 100644 --- a/embed/web-process-extension/ephy-web-process-extension.c +++ b/embed/web-process-extension/ephy-web-process-extension.c @@ -793,11 +793,7 @@ ephy_web_process_extension_initialize (EphyWebProcessExtension *extension, extension->initialized = TRUE; - /* Note: An empty guid is used ONLY for WebExtensions which do have an own initialization function */ - if (strlen (guid) > 0) - extension->script_world = webkit_script_world_new_with_name (guid); - else - extension->script_world = webkit_script_world_get_default (); + extension->script_world = webkit_script_world_new_with_name (guid); g_signal_connect (extension->script_world, "window-object-cleared", |