-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter out Marketo's email tracker from URLs #9018
Comments
It's definitely not related to this issue since it hasn't been implemented yet :) My guess is that it might be related to the referrer protections in Brave. Could you please file a new issue with more details on what tools you are using so that we can investigate? |
Sweet, yep so it turns out it was related to those protections. Should I file a bug anyway or not worth? |
Yes, please. We do try to address as many of the webcompat issues as we can. |
Done - #9665 |
@frankfuu Do you happen to have a Marketo mailing list (test or real) I could join while testing the Brave filter? I would like to make sure that when we block the user-tracking marketo query string parameter, we don't break unsubscribe links. |
@fmarier I'm not sure what you mean by mailing list? But if it's access to our Marketo instance then I don't think my employer would agree. I'm happy to try and help test it though? |
By "mailing list" I meant some mailout list of some sort. Basically sending me an test email (to [email protected]) from within Marketo. Ideally the body of the test email should include a link to say https://brave.com. What I would then like to do is click the unsubscribe link in that email to make sure that it works (i.e. you can see I unsubscribed). |
No probs. I've sent you our newsletter email. At the bottom of the email there is an unsubscribe link which takes you to an email preferences center where you can untick the emails you do not want and when you press "save". Those changes will persist against your email. You can test that it has persisted by closing and re-opening the email and clicking on unsubscribe again. |
Update: I just noticed you asked for a link in the email so I've resent you another email. It should be an email from [email protected] |
Thanks for the emails @frankfuu ! I can confirm that the
The
The unsubscribe link ( It looks like it uses that parameter to prefill my email address in the page head:
before removing it from the query string using this script. |
I tried to unsubscribe in two different ways:
@frankfuu Are you able to check whether I successfully unsubscribed from either or these lists or both? |
Ah @fmarier we have a custom unsubscribe process so you actually have to uncheck each of the options individually. Not the best user experience I know but it was a business requirement. I can see your click and web visit activity from Marketo though. Not sure if that is enough to answer your question. |
@frankfuu Thanks, I think I have enough details to start thinking about what needs to be done here. It's not going to be as easy as with the other filters. Thanks for your help in investigating this! |
No problems @fmarier , let me know if you need more testing to be done ;) |
Any update on this? |
We've not yet found a way to remove this tracker without breaking unsubscribe pages. The root of the problem is that Marketo's design uses the same identifier for tracking users as well as for authenticating them. Unless we can find a way to reliably detect and exempt unsubscribe pages, removing this tracker will not be as innocuous as the other ones we have removed so far. |
1. Change query parameter stripping approach to use split and join to make it possible to do conditional query parameter stripping. 2. Ensure that existing tests for query parameter stripping all still pass. 3. Strip mkt_tok except when `mkt_unsubscribe=1` is present in the URL. 4. Add new unit tests to ensure that mk_tok is correctly stripped under the right conditions. Resolves brave/brave-browser#9018
Release note suggested by @pes10k : "improvements to Brave’s query-parameter stripping feature, to better protect users from cross-site tracking.”" |
excellent, thanks @arthuredelstein (and @pes10k 😄 ) |
Verified
|
Brave | 1.42.61 Chromium: 103.0.5060.114 (Official Build) beta (x86_64) |
---|---|
Revision | a1c2360c5b02a6d4d6ab33796ad8a268a6128226-refs/branch-heads/5060@{#1124} |
OS | macOS Version 13.0 (Build 22A5295i) |
Shared steps:
- install
1.42.61
- launch Brave
- load each of the following URLs
- confirm the respective parameters are handled appropriately, per each testcase
Remove mkt_tok
parameter, general cases - PASSED
https://example.com/?mkt_tok=abc
https://example.com/?mkt_tok=abc&another=test
https://example.com/?param1=foo&mkt_tok=abc&another=test
?mkt_tok=abc |
?mkt_tok=abc&another=test |
?param1=foo&mkt_tok=abc&another=test |
---|---|---|
![]() |
![]() |
![]() |
Retain mkt_tok
parameter - PASSED
In all cases, confirmed we retain the mkt_tok
parameter in the URL bar, upon final load:
https://example.com/unsubscribe.html?mkt_tok=abc
https://example.com/?mkt_tok=abc&mkt_unsubscribe=1
https://example.com/?param1=foo&mkt_tok=abc&unsubscribe=yes
?mkt_tok=abc |
?mkt_tok=abc&mkt_unsubscribe=1 |
?param1=foo&mkt_tok=abc&unsubscribe=yes |
---|---|---|
![]() |
![]() |
![]() |
Regression-test existing forbidden parameters - PASSED
In all cases, confirmed the ?...
parameter was stripped upon final load:
https://example.com/?fbclid=1
https://example.com/?gclid=1
https://example.com/?msclkid=1
?fbclid=1 |
?gclid=1 |
?msclkid=1 |
---|---|---|
![]() |
![]() |
![]() |
Query-filter tests - PASSED
NOTE: You need to open this page in a private window and close all private windows in between each section. Don't copy/paste the links; you need to click on them for the test cases to work.
https://fmarier.github.io/brave-testing/query-filter.html
Direct navigations - PASSED
- Open a new tab and paste
https://brave.com/?fbclid=1
into the URL bar and pressreturn
- Confirm the
?fbclid=1
parameter is removed from the URL bar

Cross-site tests - PASSED
In all of these cases, confirmed the fbclid
parameter is missing from the landing page:
- Cross-origin navigation
- Cross-origin navigation to cross-origin 301 redirect
- Cross-origin navigation to cross-origin 302 redirect
- Cross-origin navigation to cross-origin 303 redirect
- Cross-origin navigation to cross-origin 307 redirect
- Cross-origin navigation to cross-origin 308 redirect
query-filter/?fbclid=1234 |
query-filter/xredirect1 |
query-filter/xredirect2 |
query-filter/xredirect3 |
query-filter/xredirect4 |
query-filter/xredirect5 |
---|---|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Redirected same-site tests - PASSED
In all of these cases, the fbclid
parameter should be present on the landing page, but the gclid
parameter should be missing in the intermediate step (client-side redirection).
- Cross-origin navigation to same-origin 301 redirect
- Cross-origin navigation to same-origin 302 redirect
- Cross-origin navigation to same-origin 303 redirect
- Cross-origin navigation to same-origin 307 redirect
- Cross-origin navigation to same-origin 308 redirect
- Cross-origin navigation, then same-origin navigation to same-origin 301 redirect
- Cross-origin navigation, then same-origin navigation to same-origin 302 redirect
- Cross-origin navigation, then same-origin navigation to same-origin 303 redirect
- Cross-origin navigation, then same-origin navigation to same-origin 307 redirect
- Cross-origin navigation, then same-origin navigation to same-origin 308 redirect
Same-site tests - PASSED
Thank you @stephendonner! |
Verification
Test Plan - brave/brave-core#13726 (comment) Removing mkt_tok
Keeping the mkt_tok
Existing forbidden parameters (filtering out params) |
Verification
Test Plan - brave/brave-core#13726 (comment) Removing mkt_tok
Keeping the mkt_tok
Existing forbidden parameters (filtering out params) |
The Marketo
mkt_tok
query string parameter is for tracking users and can be disabled by campaign admins though apparently it's also used in unsubscribe links.Here is a longer description of how this parameter is used and what the security implications are: https://medium.com/@thezedwards/facebook-s-ongoing-vip-user-data-exfiltration-vulnerability-via-adobes-marketo-software-why-d8435a259b0
Need to find a real example and test the unsubscribe link before we can strip out in our query string filter.
The text was updated successfully, but these errors were encountered: