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

Problems with rule processing (Adblock-style syntax) #2760

Closed
yarynanowak opened this issue Mar 23, 2024 · 3 comments
Closed

Problems with rule processing (Adblock-style syntax) #2760

yarynanowak opened this issue Mar 23, 2024 · 3 comments

Comments

@yarynanowak
Copy link

yarynanowak commented Mar 23, 2024

AdGuard Extension version

4.3.13

Browser version

Firefox 123.0.1 (64-bit)

OS version

Linux

What filters do you have enabled?

Others

What Stealth Mode options do you have enabled?

No response

Issue Details

When I add ("Filters > Custom" menu) the Ukrainian Security Filter (https://www.awwwwesome.org/data/filters/USF/adblock.txt), AdGuard does not process rules that fully comply with Adblock-style syntax.

For example, all rules from the "Domain-Based Blocklist" section of the above filter are not processed.

Even if you manually enter the rule ||0ukr.net^ in the "User rules" menu section, it is also not processed by the extension. However, if you rewrite this rule to ||0ukr.net$document, it is processed successfully.

In my opinion, this is a bug, since the ||0ukr.net^ rule fully complies with the syntax and recommendations for creating rules available at: https://adguard.com/kb/general/ad-filtering/create-own-filters/

Expected Behavior

AdGuard should process rules that fully match the Adblock syntax (for example, ||0ukr.net^)

Screenshots

Screenshot 1:

Additional Information

No response

@alexx7311
Copy link

@yarynanowak The rule ||0ukr.net^ blocks a request made to 0ukr.net, but it won't block 0ukr.net if you type that address into the search box. For the rule to work for document requests, you need the $document modifier.

We plan to improve the description in our knowledge base.

@yarynanowak
Copy link
Author

yarynanowak commented Mar 25, 2024

For the rule to work for document requests, you need the $document modifier.

@alexx7311 Is this a feature of AdGuard rule processing? I ask because uBlock Origin and Brave process the rule in the ||0ukr.net^ format without any problems, blocking access to the document (Strict blocking).

@alexx7311
Copy link

Is this a feature of AdGuard rule processing?

@yarynanowak Yes, that's right. Our approach is different, but it's more traditional than what uBlock Origin do.

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

3 participants