NanoAdblocker / NanoCore

An adblocker
GNU General Public License v3.0
457 stars 22 forks source link

'My Filters' added through logger are applied regardless if enabled or not #119

Open OverlordQ opened 6 years ago

OverlordQ commented 6 years ago

Describe the issue (Required)

Any manual edits to My Filters prevents them from being applied. If I start with a given filter[1], and try to load the page it fails[2], If I try to use the logger to create an exception[3], even though it's the exact same rule[4], it works [5]. Adding a comment and saving the exact same ruleset[6] causes it to break again.

Screenshots (Required)

1 - https://i.imgur.com/13LD9Pz.png 2 - https://i.imgur.com/qFvGGUT.png 3 - https://i.imgur.com/rVk4vqY.png 4 - https://i.imgur.com/JSFAHd9.png 5 - https://i.imgur.com/3guvDBl.png 6 -https://i.imgur.com/fLmA8i7.png

Screenshot of console (Required, press F12 to open the console)

https://i.imgur.com/UcUVRIg.png

URLs where this issue occurs (Required if applicable)

http://stream.nbcolympics.com/2018-winter-olympics-nbcsn-afternoon-feb-11

Reproduction Steps (Optional if trivial)

See Above

Environment (Required)

Your filter lists (Required)

Nano Defender Integration, Nano filters, Nano filters - Whitelist, uBlock filters, uBlock filters - Badware risks, ublock Filters - Privacy, ublock Filters - Resource abuse, uBlock filters - Unbreak, EasyList

Your custom filters (Required if you have any)

! Just a comment
@@||stream.nbcolympics.com/assets/page/general/ads.js$script,first-party

! 2/11/2018, 4:50:48 PM nbcolympics.com
@@||stream.nbcolympics.com/assets/page/general/ads.js$script,first-party
OverlordQ commented 6 years ago

Well it appears I'm an idiot. My Filters wasn't checked in '3rd Party Filters', but that means the filters added through the logger are ignoring the 'My Filters' selection and are being injected regardless and will persist until My Filters is edited.

jspenguin2017 commented 6 years ago

Filters added through wizards are partially compiled and applied, it's an (over)optimization in uBO. Hum...

jspenguin2017 commented 6 years ago

I think what should happen is that if My filters is not checked, and the user used the wizard to add a rule, then My filters will be automatically checked.

I'm not sure how this should be designed... Any recommendation?