Skip to content

Loading…

Whitelist a single rule that was blocked by Dynamic Filtering? #283

Closed
Mikey1993 opened this Issue · 26 comments

4 participants

@Mikey1993

I have a single rule from the requests that was blocked by the Dynamic Filtering feature, and I want to whitelist this single rule.

Is it possible to override it in some way from the Whitelist page?
If so, how?

@harshanvn

+1
My guess, is it will not be possible in its current form. As important filter option is applied to all the net requests blocked through dynamic filtering..
Let's see what gorhill have to say..

@Mikey1993

@harshanvn Yeah, but it would be a real shame if the goodness of blocking the frames and scripts on a page, would be forfeited as a whole because of a single rule that is breaking the site.

@harshanvn

@Mikey1993 I agree 100% with you.

@gorhill

This is not HTTPSB.

Dynamic filtering is an extra layer on what is already protecting you well. Disabling it for one page is not horrible.

I have no problem disabling whatever dynamic filter to make a site work for those which are broken by dynamic filtering and which I want to un-break: this is the way I expect people to use it, just as finer grained "power switch", off by default, but which as demonstrated in the examples, caters to users who don't care about page breakage if they can read the content, and easily turned off for a specific site.

For that kind of higher granularity, I suggest HTTPSB.

@gorhill gorhill closed this
@Mikey1993

@gorhill Is it just because you feel that uBlock is taking the control from HTTPSB?

I think, that the whole purpose of uBlock is to give the user the ultimate control of specific requests, which he can always whitelist by a simple rule, which shoud override any other feature that is trying to interfere with the whitelisting featutre - this is the ultimate strength of uBlock.

Also, when uMatrix will be alive, would you consider this to be an option?

@gorhill

Is it just because you feel that uBlock is taking the control from HTTPSB

User interests, not mine (if there was any). important was introduced because a user filter could be silently overridden because of all the exception filters in filter lists on which a user has not control. There was no way to block with 100% certainty Google Analytics. Now there is.

Dynamic filters uses the important option because that would be terrible if the UI shows something ("scripts blocked") while internally something else is happening even for just one request. You may know at all time about your own exception filters and their exact effects (not something I expect for most users, including me), but you do not for those exception filters which are not under your control.

The way to see dynamic filtering is an extra layer of aggressive yet easy filtering. Disabling it will just turn uBlock into what it always was before dynamic filtering, and this can be done only for a specific site, which is fine enough granularity for such a blocker which target mainstream users.

Fractal filtering -- never ending ability of one filter to override a previous one, is not something I plan to implement.

@gorhill

Could you give me a specific example where what you suggest would have been useful?

@Mikey1993

Yes, of course,
I was thinking about this today, when I first encountered
https://www.humblebundle.com/

This site is a game buying site, but it's irrelevant to what we are discussing.
Anyway, on this site, you can preview a YouTube short clip which demonstrates a game in the list.

When enabling the 3rd party scripts and iframes to be blocked by the global settings,
The site is barely functional, but all I want is to click on the game tile, and view the YouTube clip (and maybe later to pay for them).

The paying section on the bottom of the page also becoming available when not selecting the blockage of the 3rd party scripts.

This could be easily enabled if I could unblock a portion of the Dynamic Filtering rules, and then reload the page to see what kind of requests I should (or shouldn't) to enable that maybe was hit again by the Dynamic Filtering, or, if I am lucky, by the filtering lists, and then it should be fairly straightforward for me to whitelist them on the Whitelist tab.

This process currently isn't available due to this missing functionality.

@gorhill

What did you do before dynamic filtering was available?

@Mikey1993

I was just whitelisting the following rule which enabled me to view the YouTube video:
@@||apis.google.com/js/platform.js$domain=humblebundle.com

@gorhill

I don't have this rule, and the Youtube videos play just fine.

@Mikey1993

Hmmm.. you are right, I have just checked this again..
Maybe I was mislead back then with a cached version.

But there are another site that is totally unusable (in terms of even reading the content) when enabling the 3rd party blocks which I think that if I would be able to enable this frame (that is blocked by the Dynamic Filtering):
http://karaoketv.co.il/?noimg=1

+

After disable the blocking of the 3rd party iframe, there were scripts which still made the site not being able to even show it's content.
If I could just disable the blocking of those requests:
http://karaoketv.co.il/include/javascript/global.js?1412233558
http://karaoketv.co.il/resources/js/jquery-2.0.3.min.js

I could be able to at least see the content of the site.

Note:
I have tested this site manually by blocking the rules that 3rd party Dynamic filtering blocked, and enabling them 1 by 1 to see that I would be able to see the content of the site (in addition to other blocked requests by the Dynamic filtering), for showing that this scenario is possible and that this functionality can get an end user to be at better control of his using)

@gorhill

Here is the thing: dynamic filtering is entirely optional, if you want to use it and it interferes on a specific site, disable it on that site. Now that such feature is available, you want something more, in between not having dynamic filtering, and having it as it is now: I can't.

If I were to allow dynamic filtering to be overridden by static exception filters, this means the UI of the dynamic filters in the popup could quickly end up misrepresenting exactly what is happening in reality: this is not going to happen.

The feature is not missing functionality, it is by design that dynamic filters have precedence over static filters, that's the whole point: they can be easily turned off -- unlike static filters. What you want is finer grained control, which you still have by crafting your own static filters for that specific site:

||karaoketv.co.il^$script
@@||karaoketv.co.il/include/javascript/global.js
@@||karaoketv.co.il/resources/js/jquery-*.min.js

In general, blocking 1st-party scripts on a site is very likely to break a site. Use it at your own risk (just like I stated in the wiki). To fix the breakage, do not block 1st-party scripts in the above example, asking me to undermine the reliability of dynamic filters is not the solution.

@gorhill

By the way, for the record, I use dynamic filtering as follow:

I block 3rd-party scripts and 3rd-party frames by default. When a site I care about breaks, I disable whatever dynamic filter needs to be disable on that specific site (i.e. I allow 3rd-party scripts on github).

I don't block 1st-party by default because this will cripple most sites, without adding much in term of privacy and security.

The 1st-party dynamic filters exist because it may happen as an exception that a user wants to completely block scripts on a specific site.

@gorhill

Just to be sure: When I visited http://karaoketv.co.il/?noimg=1, it does look like the site displayed just fine. The only reason for the requests you showed to be blocked is because you activated the blocking of 1st-party scripts -- the 1st-party in the current case being karaoketv.co.il. You did not mention this above. Blocking 1st-party scripts is crippling, the solution is to not block 1st-party scripts, not to start to cherry pick which one to not block.

@Mikey1993

@gorhill I have enabled only 3rd-party, no 1st-party blocking was enabled when testing this site.
I don't know what happened, but I am sure that I had ONLY 3rd-party blocking enabled back when testing this site.
Something has changed, and I have no clue what that is..

@Mikey1993

First of all I have visited
http://karaoketv.co.il/
(Without the "?noimg=1")

And I am pretty sure that these ones were accounted back then as being third party scripts.. (or I am just going crazy..)
http://karaoketv.co.il/resources/js/jquery-2.0.3.min.js
http://karaoketv.co.il/resources/js/jquery.form.min.js

Maybe purging the cache can have some effect on Dynamic filtering? :(

@gorhill

The 3rd-party cell is always the right-most of the specific type, regardless of language direction. For example, in the picture at https://github.com/gorhill/uBlock/wiki/Dynamic-filtering---examples, 3rd-party scripts and frames are dynamically blocked.

@Mikey1993

Yes, this is exactly how I remember testing it (Only 3rd-party blocking enabled), but now it's just not accounting these requests..
Sorry for the bother.. I can't really explain this..

@gorhill

Humble Bundle also works without any break even with 3rd-party blocking of scripts and iframes enabled

?

It is not supposed to. I need to unblock 3rd-party scripts to be able to make the site interactive, then unblock 3rd-party frames to see Youtube.

Are you forcing a page reload after you change the dynamic filters? You have to, uBlock won't force reload the page for you (by design). The reload cannot be avoided when it's about unblocking/blocking scripts. For frames, the reload may be avoided if the frames are created dynamically by the page.

@Mikey1993

I removed that comment - It was my mistake.

@JohnRS

I just started using uBlock today and I'm loving it. I am having a minor problem when I go to print a page, however. Chrome's print is fine, but I normally use the CleanPrint extension to format the page first. Apparently Dynamic Filtering is seeing it as a 3rd party script (which I have set to block).

I would love to have a way to whitelist the CleanPrint site so that I would not have to disable the feature in uBlock each time I want to print. I would need a rule which worked based on the CleanPrint server's name, not the web site that I am printing, since I print from different sites, often new ones.. Here is the blocked request from the Status screen.

image

Would allowing "@@" to work with "important" help?

Thanks! John

@gorhill

Currently not possible. Allowing exception filters to override important filters would render these unreliable, which would defeat the purpose of the important option, which as opposed to traditional filters are 100% reliable. Users could end up having some 3rd-party filters whitelisting what they explictly want blocked (a good example of this is the blanket-whitelisting of Google Ads in the Danish filter list).

I can see the problem though. But I this point I don't want to overcomplicate uBlock. This is something uMatrix would take care easily, but it's for more experienced users.

A solution I have been thinking lately for seemingly unrelated issue #236 could also lead to a solution for the current problem you are facing, which is that a user's filters would take precedence over external filters, and in such case it would become possible to have an exception like you wish: a user could override his own filters, but no external filters could override a user's filters. The important option was introduced to get this behavior because back then I worried that having two blocks of filter evaluation would be a performance issue. But much work has been done since then which make me think it's now entirely possible.

@JohnRS

Interesting. Do the Dynamic Filter settings need to be "important"?

As I mentioned, it isn't that big a deal. I can certainly handle a few extra clicks when I want to print. And I will be looking forward to uMatrix! :)

The idea of user rules being "more important" than external rules certains sounds interesting, also.

Thanks very much for the consideration!

@gorhill

Do the Dynamic Filter settings need to be "important"?

I have a strong opinion that yes, they need to, otherwise the UI which shows whether all scripts/frames are blocked could potentially "lie" (because of an exception buried somewhere that the user may not even know about), and I can't let this happen.

@JohnRS

I see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.