disconnectme / disconnect

Disconnect is a browser extension that makes the web faster, more private, and more secure.
https://disconnect.me/
GNU General Public License v3.0
781 stars 136 forks source link

disconnect misses some scripts #252

Open dim0x69 opened 10 years ago

dim0x69 commented 10 years ago

I noticed disconnect is not blocking some scripts it should block. Some examples:

Any article on heise.de loads this script (e.g. that):

Any wordpress.com-hosted blog. (e.g. [thathttp://sxchristopher.wordpress.com/2013/12/24/city-trains/))

Please note: This sites (ivwbox.de and amazon-adsystem.com) are both on the blocklist.

I am not a Firefox or JavaScript developer, but as far as I understand it seems like the problem is in policy.js, line 102-104. Either .js-files included like the examples above got no ownerDocument (because they are their own documents). MDN says about Node.ownerDocument:

If this property is used on a node that is itself a document, the result is null. Node.ownerDocument

or because disconnect is accessing some structures outside the scope they should access:

shouldLoad() must not ... Query any DOM properties that depend on the current state of the DOM outside the "context" node (e.g., lengths of node lists). ncIContentPolicy

Is it possible that this problem might also occur if the browser loads img- or css-files?

My system:

Thank you!