[epiphany] web-extension: Really fix blocking of URIs
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] web-extension: Really fix blocking of URIs
- Date: Tue, 25 Oct 2016 23:17:53 +0000 (UTC)
commit f54c5518cd6351e7c08a651a81b2087e86a75f56
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Tue Oct 25 18:12:53 2016 -0500
web-extension: Really fix blocking of URIs
We can't pass NULL here, we have to return TRUE to block it.
embed/web-extension/ephy-web-extension.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 6fa8812..25e3821 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -131,10 +131,16 @@ web_page_send_request (WebKitWebPage *web_page,
modified_uri = ephy_uri_tester_proxy_maybe_rewrite_uri (extension->uri_tester,
request_uri,
page_uri);
+
+ if (strlen (modified_uri) == 0) {
+ LOG ("Refused to load %s", request_uri);
+ g_free (modified_uri);
+ return TRUE;
+ }
+
if (g_strcmp0 (request_uri, modified_uri) != 0) {
LOG ("Rewrote %s to %s", request_uri, modified_uri);
- webkit_uri_request_set_uri (request,
- strlen (modified_uri) > 0 ? modified_uri : NULL);
+ webkit_uri_request_set_uri (request, modified_uri);
}
g_free (modified_uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]