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

Specific network filtering rules become invalid if it have ~document exception #650

Closed
7 of 8 tasks
kowith337 opened this issue Jul 1, 2019 · 4 comments
Closed
7 of 8 tasks
Labels
invalid not a uBlock issue

Comments

@kowith337
Copy link

kowith337 commented Jul 1, 2019

Prerequisites

  • I verified that this is not a filter issue
    • Filter issues MUST be reported at filter issue tracker

      I'm not sure about this, probably internal filter read, not external filters.

  • This is not a support issue or a question
  • I performed a cursory search of the issue tracker to avoid opening a duplicate issue
    • Your issue may already be reported.
  • I tried to reproduce the issue when...
    • uBlock Origin is the only extension
    • uBlock Origin with default lists/settings
    • using a new, unmodified browser profile
  • I am running the latest version of uBlock Origin
  • I checked the documentation to understand that the issue I report is not a normal behavior

Description

When I added some network filter that include ~document exception, uBlock logger reported the filter that I've putted in is invalid

A specific URL where the issue occurs

No URL, just internal uBlock (maybe only logger?)

Steps to Reproduce

  1. Open uBlock Dashboard
  2. Go to My Filters
  3. Try add some network blocking and include ~document exception, e.g.
    ||example.com/page$~document
    ||example.com/page$important,~document

Expected behavior:

uBlock Logger doesn't reported as invalid, probably the network filter is usable.

Actual behavior:

uBlock Logger reported the filter is invalid

Your environment

  • uBlock Origin version: 1.20.0 onward
  • Browser Name and version:
    • Chromium NoSync: 77.0.3814.0 (64-bit)
    • Firefox 67.0.4 (64-bit) + uBlock 1.20.0
    • Cent Browser: 4.0.9.112 (Official Build) (32-bit) (portable) (Chromium 74.0.3729.169) + NanoAdblocker 1.0.0.117
    • Pale Moon 28.5.2 (64-bit) + uBlock Legacy 1.16.4.11
  • Operating System and version: Windows 10 x64 Update 1903 (rs5)

Screenshots

Firefox
image

Chromium
image

CentBrowser + Nano
image

Pale Moon + uBO Legacy
image

@kowith337 kowith337 changed the title Network filtering become invalid when exclude ~document Network filtering rules become invalid if exclude document Jul 1, 2019
@kowith337 kowith337 changed the title Network filtering rules become invalid if exclude document Specific network filtering rules become invalid if it have ~document exception Jul 1, 2019
@gwarser
Copy link

gwarser commented Jul 1, 2019

3\. Try add some network blocking and include `~document` exception, e.g.
    `||example.com/page$~document`
    `||example.com/page$important,~document`

Expected behavior:

uBlock Logger doesn't reported as invalid, probably the network filter is usable.

What you think this filter should do?

@gwarser
Copy link

gwarser commented Jul 1, 2019

You should read about all option and linked issue https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#all

gorhill/uBlock#2385

@kowith337
Copy link
Author

kowith337 commented Jul 1, 2019

What you think this filter should do?

To block everything except document (aka. page load)

Example from real use, when I block ||facebook.com/ads/$~document will be block other requests except documents to allow me accessing specific pages like https://www.facebook.com/ads/preferences

@gorhill
Copy link
Member

gorhill commented Jul 1, 2019

Using ||facebook.com/ads/ will block all matching network requests and will not block document, so no need to add ~document.

@uBlock-user uBlock-user added the invalid not a uBlock issue label Jul 1, 2019
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