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

Provide an option to block request when it's opened in the main frame #152

Closed
ameshkov opened this issue Dec 17, 2017 · 9 comments
Closed

Comments

@ameshkov
Copy link
Member

ameshkov commented Dec 17, 2017

Details:
AdguardTeam/AdguardForWindows#2043

Basically, we need to provide a "strict" level of blocking. When the strict level is enabled, we should block requests even when they're executed in the main browser frame.

Also, we'd better provide a modifier for blocking rules that will allow overriding the default behavior:
AdguardTeam/AdguardForWindows#2084 (comment)

The easiest way would be to allow $document modifier in the blacklist rules.

Also, add $all modifier:
https://github.com/gorhill/ublock/wiki/Static-filter-syntax#all

@FadeMind
Copy link

@ameshkov thanks for approving my idea. Regards

@ameshkov
Copy link
Member Author

@FadeMind it makes perfect sense, thank you! Also, it's quite often when people ask us how to block this or that completely, and using $empty is not an ideal solution

@vshlobinag
Copy link

core/pull-requests/1482

@ameshkov
Copy link
Member Author

There are some issues with the current implementation.

||exoclick.com^$document for some reason is applied instead of ||syndication.exoclick.com/splash.php?$empty,important,domain=dashishipin.com:
image

The second issue is that a $document rule is applied to a non-DOCUMENT response.

And finally, the third issue is that the $all rule, in this case, won't block non-document requests while it actually should.

@vshlobinag vshlobinag removed their assignment Oct 17, 2019
@sxgunchenko
Copy link

core/pull-requests/1564

@AdamWr
Copy link
Member

AdamWr commented May 25, 2020

Regarding this issue - #152 (comment)

It seems that it happens again.

Steps to reproduce:

  1. Add this rule:
    ||cda-tv.online^$document
  2. Go here - https://cda-tv.online/filmy-online/malgosia-i-jas/ and click on "Proceed anyway" button
  3. Click on one of the video players (marked on screenshot below).
Screenshot

image

Request marked as Other type is blocked.

Screenshot

image

@sxgunchenko
Copy link

It's not a regression since the actual request type detected by the filtering engine is xhr+document.
But there is an issue with the content type displaying which resides in the UI.

@AdamWr
Copy link
Member

AdamWr commented May 26, 2020

Ok, thank you for your answer.
Anyway, I'm wondering why $document must be applied in case like that?
Is there any real case where is needed to apply rule with $document modifier to request which is detected as xhr+document?

@adbuker
Copy link

adbuker commented May 26, 2020

@AdamWr, as for Adg4Win we'll improve content-type displaying soon - the corresponding task has been created

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

8 participants