[epiphany/mcatanzaro/do-not-track] Remove support for do-not-track headers
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/do-not-track] Remove support for do-not-track headers
- Date: Tue, 5 Feb 2019 17:50:45 +0000 (UTC)
commit 4e9346959019c58601955faec516cd1bfcce0577
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Mon Feb 4 22:34:20 2019 -0600
Remove support for do-not-track headers
It's removed from Safari since fingerprinting risk outweighs negligible
privacy benefit. The risk is lower for Epiphany since we have it enabled
by default -- a direct violation of the standard, of course -- but it's
a failed standard anyway, time to die.
data/org.gnome.epiphany.gschema.xml | 2 +-
embed/web-extension/ephy-web-extension.c | 16 +++-------------
2 files changed, 4 insertions(+), 14 deletions(-)
---
diff --git a/data/org.gnome.epiphany.gschema.xml b/data/org.gnome.epiphany.gschema.xml
index c49207002..cc4a2f381 100644
--- a/data/org.gnome.epiphany.gschema.xml
+++ b/data/org.gnome.epiphany.gschema.xml
@@ -177,7 +177,7 @@
<key type="b" name="do-not-track">
<default>true</default>
<summary>Do Not Track</summary>
- <description>Enables DNT headers and tracking query parameter removal. Note that when
changing this setting from the preferences dialog, the adblock-filters setting will additionally be updated
to add/remove EasyPrivacy filters.</description>
+ <description>Enables tracking query parameter removal. Note that when changing this
setting from the preferences dialog, the adblock-filters setting will additionally be updated to add/remove
EasyPrivacy filters.</description>
</key>
<key type="b" name="enable-adblock">
<default>true</default>
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index f059c207b..14dcc4469 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -145,21 +145,14 @@ web_page_send_request (WebKitWebPage *web_page,
const char *request_uri;
const char *redirected_response_uri;
const char *page_uri;
- char *modified_uri = NULL;
+ g_autofree char *modified_uri = NULL;
request_uri = webkit_uri_request_get_uri (request);
page_uri = webkit_web_page_get_uri (web_page);
redirected_response_uri = redirected_response ? webkit_uri_response_get_uri (redirected_response) : NULL;
- if (g_settings_get_boolean (EPHY_SETTINGS_WEB_EXTENSION_WEB, EPHY_PREFS_WEB_DO_NOT_TRACK)) {
- SoupMessageHeaders *headers = webkit_uri_request_get_http_headers (request);
- if (headers) {
- /* Do Not Track header. '1' means 'opt-out'. See:
- * http://tools.ietf.org/id/draft-mayer-do-not-track-00.txt */
- soup_message_headers_append (headers, "DNT", "1");
- }
+ if (g_settings_get_boolean (EPHY_SETTINGS_WEB_EXTENSION_WEB, EPHY_PREFS_WEB_DO_NOT_TRACK))
modified_uri = ephy_remove_tracking_from_uri (request_uri);
- }
if (should_use_adblocker (request_uri, page_uri, redirected_response_uri)) {
char *result;
@@ -168,13 +161,12 @@ web_page_send_request (WebKitWebPage *web_page,
result = ephy_uri_tester_rewrite_uri (extension->uri_tester,
modified_uri ? modified_uri : request_uri,
page_uri);
- g_free (modified_uri);
-
if (!result) {
LOG ("Refused to load %s", request_uri);
return TRUE;
}
+ g_free (modified_uri);
modified_uri = result;
} else if (!modified_uri) {
return FALSE;
@@ -185,8 +177,6 @@ web_page_send_request (WebKitWebPage *web_page,
webkit_uri_request_set_uri (request, modified_uri);
}
- g_free (modified_uri);
-
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]