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




commit b1f2d45f163f0f85f020a67d6bb76af8fe176019
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.
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/1136>

 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]