AdguardTeam / CoreLibs

Core Adguard libraries
https://adguard.com/
Apache License 2.0
40 stars 7 forks source link

Rules with `$all` modifier do not work in some cases #1590

Closed AdamWr closed 2 years ago

AdamWr commented 2 years ago

Maybe related to this - https://github.com/AdguardTeam/CoreLibs/issues/1531

Steps to reproduce

  1. Add this rule:
    ||iana.org^$all
  2. Go to - https://www.iana.org/

Expected behavior

There should be a message that website was blocked.

Actual behavior

Main document is not blocked, but requests are blocked.

Screenshot ![image](https://user-images.githubusercontent.com/29142494/151708141-c82e0327-61d7-489c-a8f2-df5990b30c45.png)

On https://example.org/ it works fine.

||example.org^$all
Screenshot ![image](https://user-images.githubusercontent.com/29142494/151708356-320fa5d9-1b62-4dda-8690-c189e524dafc.png)

AdGuard for Windows version 7.9 nightly 7 (build 3802, CL 1.9.20)

sxgunchenko commented 2 years ago

@AdamWr are you sure that the request is matched by the rule? Could you please reproduce it and check if the request to iana.org bypasses filtering for some reason?

AdamWr commented 2 years ago

I can't reproduce this issue on iana.org with latest nightly build (7.9 nightly 8 (build 3812, CL 1.9.20)).

According to my screenshot from first post, requests were matched by rule: image

But I still can reproduce it on another websites like: https://lenta.ru/ or https://cdaction.pl/

Rules:

||lenta.ru^$all
||cdaction.pl^$all

image

image

AdamWr commented 2 years ago

Okay, I think that I found a culprit of this issue. It looks like that issue occurs when this filter list is added to filters - https://hole.cert.pl/domains/domains_adblock.txt

krystian3w commented 2 years ago

I recomended change ^ to ^$all for better support strict-block prompts.

If this need revert on NASK level then try write on wykop on by mail.