[epiphany/pgriffis/web-extension-beastify: 2/4] WebExtensions: Grant permissions to extension's own host by default




commit 77c8351ee1d179fd865d223c9426317e2bba39e7
Author: Patrick Griffis <pgriffis igalia com>
Date:   Sun May 22 20:49:05 2022 -0500

    WebExtensions: Grant permissions to extension's own host by default

 src/webextension/ephy-web-extension.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/webextension/ephy-web-extension.c b/src/webextension/ephy-web-extension.c
index cc4c2654a..f9585b7c3 100644
--- a/src/webextension/ephy-web-extension.c
+++ b/src/webextension/ephy-web-extension.c
@@ -760,6 +760,8 @@ ephy_web_extension_init (EphyWebExtension *self)
   self->permissions = g_ptr_array_new_full (1, g_free);
 
   self->guid = g_uuid_string_random ();
+
+  g_ptr_array_add (self->permissions, g_strdup_printf ("ephy-webextension://%s/*", self->guid));
 }
 
 static EphyWebExtension *
@@ -1212,7 +1214,7 @@ static gboolean
 is_supported_scheme (const char *scheme)
 {
   static const char * const supported_schemes[] = {
-    "http", "https", "ws", "wss", "data", "file"
+    "http", "https", "ws", "wss", "data", "file", "ephy-webextension"
   };
 
   for (uint i = 0; i < G_N_ELEMENTS (supported_schemes); i++) {


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