[hackers]

From: nzl <uruabi_AT_gmail.com>
Date: Mon, 19 Nov 2018 02:14:47 +0800

From 8ed3ce1f6ef48ee6e768dbf85c2c40d08a58b706 Mon Sep 17 00:00:00 2001
From: nzl <uruabi_AT_gmail.com>
Date: Sun, 18 Nov 2018 18:01:52 +0000
Subject: [surf[PATCH] Remove HTTP referer on navigation

---
 surf.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/surf.c b/surf.c
index d48fbc9..4175f06 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -1618,6 +1618,7 @@ decidenavigation(WebKitPolicyDecision *d, Client *c)
 	WebKitNavigationAction *a =
 	    webkit_navigation_policy_decision_get_navigation_action(
 	    WEBKIT_NAVIGATION_POLICY_DECISION(d));
+	SoupMessageHeaders *h;
 
 	switch (webkit_navigation_action_get_navigation_type(a)) {
 	case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED: /* fallthrough */
_AT_@ -1632,6 +1633,10 @@ decidenavigation(WebKitPolicyDecision *d, Client *c)
 		    WEBKIT_NAVIGATION_POLICY_DECISION(d))) {
 			webkit_policy_decision_ignore(d);
 		} else {
+			h = webkit_uri_request_get_http_headers(
+			    webkit_navigation_action_get_request(a));
+			if (h)
+				soup_message_headers_remove(h, "Referer");
 			/* Filter out navigation to different domain ? */
 			/* get action→urirequest, copy and load in new window+view
 			 * on Ctrl+Click ? */
-- 
2.19.1
Received on Sun Nov 18 2018 - 19:14:47 CET

This archive was generated by hypermail 2.3.0 : Sun Nov 18 2018 - 19:24:22 CET