Skip to content
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

removeparam is sometimes not applied when clicking on links #1704

Closed
9 tasks done
rusty-snake opened this issue Sep 3, 2021 · 3 comments
Closed
9 tasks done

removeparam is sometimes not applied when clicking on links #1704

rusty-snake opened this issue Sep 3, 2021 · 3 comments
Labels
invalid not a uBlock issue

Comments

@rusty-snake
Copy link

Prerequisites

I tried to reproduce the issue when...

  • uBO is the only extension
  • uBO with default lists/settings
  • using a new, unmodified browser profile

Description

Sometime (if links are realized using JS events rather than <a>) removeparam does not remove query params.

Originally I discovered this on AMO search (https://addons.mozilla.org/en-US/firefox/search/?q=ublock+origin) with utm_* params. However the STR will use youtube with a custom removeparam rule because AMO is special (requires extensions.webextensions.restrictedDomains="" & privacy.resistFingerprinting.block_mozAddonManager=true) and youtube was the first site I could find where I could reproduce this behaviour.

This bug maybe relates to the "Prevents tracking injection over history API" option of ClearURLs.

  • uBO with default lists/settings

Default settings except for using Privacy>AdGuard URL Tracking Protection and $removeparam=v.

A specific URL where the issue occurs

https://youtube.com/

Steps to Reproduce

  1. Add $removeparam=v to your filters
  2. Open https://www.youtube.com/ (and agree to help G to improve their service, manipulate you and so on)
  3. Click on any video
  4. Look at urlbar and see https://www.youtube.com/watch?v=1234asdf
  5. Reload (Strg+R)
  6. Look at urlbar and see https://www.youtube.com/
  7. Look into the logger and see that only at step 5 (but not at step 3) v gets removed.

Expected behavior

Query parameters get removed in step 3 and 5.

Actual behavior

Query parameters are removed only in step 5.

uBlock Origin version

1.37.2

Browser name and version

Firefox 91.0.2

Operating System and version

Fedora 34

@uBlock-user
Copy link
Contributor

Look into the logger and see that only at step 5 (but not at step 3) v gets removed.

$removeparam only applies if a network request is made, youtube doesn't make a network request if you click any video on the homepage.

@gorhill
Copy link
Member

gorhill commented Sep 3, 2021

I don't see any instance of v= in the logger when following the repro steps. What you are looking at is Youtube replacing the URL address using replace(), it's a cosmetic change by the browser, while uBO's removeparam works on outgoing network requests.

@gorhill gorhill closed this as completed Sep 3, 2021
@gorhill gorhill added the invalid not a uBlock issue label Sep 3, 2021
@krystian3w
Copy link

krystian3w commented Nov 20, 2021

Any chance to generate specific abort action to use replace() - e.g. by aost?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid not a uBlock issue
Projects
None yet
Development

No branches or pull requests

4 participants