Skip to content

Commit

Permalink
Filter out Drip's email tracker from URLs (fixes brave/brave-browser#…
Browse files Browse the repository at this point in the history
  • Loading branch information
fmarier committed Feb 18, 2021
1 parent 3416c25 commit 02abf98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions browser/net/brave_site_hacks_network_delegate_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const std::string& GetQueryStringTrackers() {
"wickedid",
// https://github.com/brave/brave-browser/issues/11578
"yclid",
// https://github.com/brave/brave-browser/issues/8975
"__s",
// https://github.com/brave/brave-browser/issues/9019
"_hsenc", "__hssc", "__hstc", "__hsfp", "hsCtaTracking"}),
"|"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ TEST(BraveSiteHacksNetworkDelegateHelperTest, QueryStringUntouched) {
"https://example.com/?%20fbclid=1",
"https://example.com/#fbclid=1",
"https://example.com/1;k=v;&a=b&c=d&gclid=1234;%3fhttp://ad.co/?e=f&g=1",
"https://example.com/?__ss=1234-abcd",
});
for (const auto& url : urls) {
auto brave_request_info =
Expand Down Expand Up @@ -251,6 +252,7 @@ TEST(BraveSiteHacksNetworkDelegateHelperTest, QueryStringFiltered) {
"https://example.com/?fbclid=&foo=1&bar=2"},
{"http://u:[email protected]/path/file.html?foo=1&fbclid=abcd#fragment",
"http://u:[email protected]/path/file.html?foo=1#fragment"},
{"https://example.com/?__s=1234-abcd", "https://example.com/"},
// Obscure edge cases that break most parsers:
{"https://example.com/?fbclid&foo&&gclid=2&bar=&%20",
"https://example.com/?fbclid&foo&&bar=&%20"},
Expand Down

0 comments on commit 02abf98

Please sign in to comment.