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 rule not being enforced #140

Open
dportvine opened this issue Jun 21, 2024 · 9 comments
Open

removeparam rule not being enforced #140

dportvine opened this issue Jun 21, 2024 · 9 comments

Comments

@dportvine
Copy link

Google Chrome
uBlock Origin Lite 2024.6.17.766

Does this rule not work due to MV3 limitations?

*$removeparam=xtor ~> AdGuard URL Tracking Protection

https://www.bbc.com/ukrainian/articles/c7223ygzmvmo?xtor=AL-73-%5Bpartner%5D-%5Bukr%5D-%5Bheadline%5D-%5Bukrainian%5D-%5Bbizdev%5D-%5Bisapi%5D
@gorhill
Copy link
Member

gorhill commented Jun 21, 2024

Weird, it doesn't work in latest release, but it works when I compile a local version of uBOL.


Now it works in the latest release, not sure what is going on.

@dportvine
Copy link
Author

Still doesn't work for me. 🤷🏻‍♂️

@dportvine
Copy link
Author

Very weird... Re-enabling the basic or regional subscription helps me.

Video
Video_2024-06-21_231213.mp4

@garry-ut99

This comment was marked as abuse.

@gorhill gorhill changed the title bbc.com removeparam rule no tbeing enforced Jun 25, 2024
@gorhill gorhill changed the title removeparam rule no tbeing enforced removeparam rule not being enforced Jun 25, 2024
@gorhill
Copy link
Member

gorhill commented Jun 25, 2024

@garry-ut99 Thanks for the investigation, I confirm there is an issue with how the DNR rule works.

Simple repro steps is to take two generic removeparam rules from each default and adguard-spyware-url.json ruleset, and pick a parameter in each rule not found in the other, and see whether both parameters are removed. Example (as of writing):

vgo_ee is found in a generic removeparam rule found in default.json ruleset, xtor is found in a generic removeparam rule in adguard-spyware-url.json. When navigating to URL below, only one of the parameter is removed.

https://example.com/?vgo_ee=1&xtor=1

Probably related webextensions issue: w3c/webextensions#468

@subham8907
Copy link

Hello,

I'm working on an MV3 extension project to remove nasty tracking parameters from URLs. I've encountered an issue with DNR (Declarative Net Request) limitations:

DNR claims:

  • 30,000 static rules work
  • 50 rulesets can work at the same time

But from my research, there's a hidden limit:

  • If you're developing an extension to remove parameters, you should know that if 1 rule contains 30 or 40 parameters, you can't add 30 similar rules
  • There's a limit to that

Real example:

  • uBlock Origin Lite's adguard-spyware-url.json has 499 rules in the JSON file
  • But not all rules are enforced because of rule complexity

Solution:
You have to divide those 499 rules into multiple JSON files if you want to enforce all 499 rules together.

@subham8907
Copy link

So in short before you reached 30000 limit you exaused 50 ruleset limit

@stephenhawk8054
Copy link
Member

stephenhawk8054 commented Sep 21, 2024

@gorhill I see a case where the removed parameters left ? in the URL: https://www.reddit.com/r/uBlockOrigin/comments/1f9q2nt/google_autotagging_trackers_not_being_blocked_by/lo1sjzo/

STR:

  1. Go to google.com and search bitdefender
  2. Click on 1st link to go to https://www.bitdefender.com
  3. The URL appears as https://www.bitdefender.com?

In the network console, I see https://www.bitdefender.com/?srsltid=AfmBOootNghSoi8YRDJqc7axmi9SgWPuwphdq-pZl-CI-PhPhNjk8U0R being redirected as expected due to the filter $removeparam=srsltid in default privacy list, but didn't expect ? to be left there.

Is it an issue from MV3 itself?

@gorhill
Copy link
Member

gorhill commented Sep 21, 2024

https://issues.chromium.org/issues/40886355

gorhill added a commit to gorhill/uBlock that referenced this issue Nov 15, 2024
Related issue:
uBlockOrigin/uBOL-home#140

This will allow more specific `removeparam` filters to override
generic ones. This doesn't fix the related issue but should help
more specific `removeparam` filters to be applied.

Related webextensions issue:
w3c/webextensions#468
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants