AdNauseam icon indicating copy to clipboard operation
AdNauseam copied to clipboard

Blocking Filters not working on specific request?

Open cqx931 opened this issue 8 years ago • 7 comments

||serving-sys.com^$third-party This rule works on requests to secure-ds.serving-sys.com but not to bs.serving-sys.com... Shouldn't it block all the requests from serving-sys.com that are third-party?

Test case: http://chenqianxun.com/testcases/testRequest.html image


from nytimes.com

image

cqx931 avatar Feb 07 '17 04:02 cqx931

There is an EasyList rule which is being allowed (EasyList allow logging is disabled by default, but maybe we should change this -- it fills the log very quickly?):

[ALLOW!] (EasyList) /adserver.: : https://bs.serving-sys.com/serving/adServer.bs?cn=display&c=19&mc=imp&pli=20258699&PluID=0&ord=1214379584&rtu=-1

Anyhow, we should probably block such requests in adnauseam.txt as a $important rule

dhowe avatar Feb 07 '17 12:02 dhowe

But shouldn't it hit case C instead of case D, because there is a blocking rule in Easy Privacy? ||serving-sys.com^$third-party

cqx931 avatar Feb 08 '17 04:02 cqx931

https://github.com/dhowe/AdNauseam/blob/master/src/js/adn/core.js#L1111 I think the reason is that we always receive one matched token from ublock.

In this case, the token returned is "/adserver", which matches with EasyList. The same rule is not in other lists, therefore adnauseam allow the request. Though the part "serving-sys.com" is also a match here, the token is not returned, therefore adnauseam will never know that this part could be blocked with another list.

Adding $important will help to parse "serving-sys.com" rather than "/adserver" from the url. This could be an argument for adding $important to all blocking rules in adnauseam.txt

cqx931 avatar Feb 08 '17 05:02 cqx931

Where are we on this?

dhowe avatar Feb 27 '17 06:02 dhowe

This leads to adding $important to blocking rules in adnauseam.txt https://github.com/dhowe/AdNauseam/issues/834

cqx931 avatar Feb 27 '17 06:02 cqx931

Any downside?

dhowe avatar Feb 27 '17 06:02 dhowe

I don't see any downside for now. If there are some blocking rules in adnauseam.txt but have more specific exception rules in other lists, they will still be blocked. And if we want those unblocking to be triggered, it means that the rule itself need to be written more specifically, not the problem with $important.

cqx931 avatar Feb 28 '17 04:02 cqx931