[epiphany/pgriffis/web-extension/content-script-replies: 1/4] WebExtensions: Fix checking for host permissions




commit 47ba2e790a8cde826467f165d9ad9568faa571d4
Author: Patrick Griffis <pgriffis igalia com>
Date:   Mon Jun 6 11:11:29 2022 -0500

    WebExtensions: Fix checking for host permissions
    
    Indexed the wrong array.

 src/webextension/ephy-web-extension.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/webextension/ephy-web-extension.c b/src/webextension/ephy-web-extension.c
index 6f0a386c1..bcbf3f93a 100644
--- a/src/webextension/ephy-web-extension.c
+++ b/src/webextension/ephy-web-extension.c
@@ -1434,7 +1434,7 @@ ephy_web_extension_has_permission_internal (EphyWebExtension *self,
   /* Note this one is NULL terminated. */
   for (guint i = 0; i < self->host_permissions->len - 1; i++) {
     GUri *host = g_uri_parse (ephy_web_view_get_address (web_view), G_URI_FLAGS_ENCODED_PATH | 
G_URI_FLAGS_ENCODED_QUERY | G_URI_FLAGS_SCHEME_NORMALIZE, NULL);
-    const char *permission = g_ptr_array_index (self->permissions, i);
+    const char *permission = g_ptr_array_index (self->host_permissions, i);
 
     g_assert (host);
 


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