gorhill / uMatrix

uMatrix: Point and click matrix to filter net requests according to source, destination and type
GNU General Public License v3.0
4.55k stars 470 forks source link

Some scripts work even when it is prohibited in rules #943

Closed crimsonlander closed 6 years ago

crimsonlander commented 6 years ago

When I add rules like "website block", most content is blocked, but some scripts still work. For example, there are scripts for disabling text selection on page and showing prompt on onmouseup event on this page http://pelevin.nov.ru/rass/pe-bubn/1.html :

<body onmouseup="if (event.which==3) return false;" oncontextmenu="alert(&#39;Мы просим прощения, но копировать тексты отсюда нельзя. Не потому что мы такие, а потому что на это есть десять тысяч внешних причин. Вы можете считать это событие непреодолимой силой Природы и давайте сделаем вид, что ничего не произошло.&#39;); return false;" onselectstart="return false;" oncopy="return false;" bgcolor="#DBDBDB" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" background="./«Чапаев и Пустота» _ Романы _ Виктор Пелевин __ сайт творчества_files/bg.gif" onload="disableSelection(document.body);">

<script type="text/javascript" async="" src="http://www.acint.net/aci.js"></script><script language="JavaScript1.2">function disableSelection(target){
if (typeof target.onselectstart!="undefined") //IE route
    target.onselectstart=function(){return false;}
else // All other route (ie: Opera)
    target.onmousedown=function(){return false;}
// target.style.cursor = "default"
}

disableSelection(document.body) //Disable text selection on entire body
</script>

When I remove these scripts from page manually, it stops capturing mouse clicks and no longer prevents text selection, so indeed there are no other reasons for such behavior. I have tried following rules:

pelevin.nov.ru * * block
pelevin.nov.ru pelevin.nov.ru * block
pelevin.nov.ru pelevin.nov.ru script block

And none of that prevents these scripts from working. I am using uMatrix 1.3.2, Vivaldi 1.14.1077.41 64-bit, Ubuntu 16.04.

gorhill commented 6 years ago

Unable to reproduce with Chromium 64.

I don't support Vivaldi. Be sure you reload with bypassing the cache after you change rules and do not see the effects.

crimsonlander commented 6 years ago

Checked again. uMatrix doesn't block these scripts in Vivaldi, but blocks in Chromium. Refreshing with bypassing the cache doesn't help.

gorhill commented 6 years ago

Volunteer developer(s) for Vivaldi will have to step up and offer support for it -- I just can't add more work to what I am already committed on my side. Best is a fork for Vivaldi so that issues specific to Vivaldi gets reported to the fork rather than here. I will accept pull request fixes for Vivaldi if I feel they are not undermining code sanity (i.e. ugly patches for weird Vivaldi-specific issues won't be accepted).

crimsonlander commented 6 years ago

Tried blocking these scripts with ScriptSafe, it also doesn't work with Vivaldi, but works with Chromium. So it seems like this is not extension problem.

uBlock-user commented 6 years ago

Tried blocking these scripts with ScriptSafe, it also doesn't work with Vivaldi, but works with Chromium.

That itself proves that the issue lies with Vivaldi. Report to the devs.