gorhill / uBlock

uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.
GNU General Public License v3.0
45.6k stars 3.05k forks source link

Inline script tag filtering incompatible with Firefox ESR 38 #940

Closed flyingzebras closed 8 years ago

flyingzebras commented 8 years ago

https://github.com/gorhill/uBlock/issues/795#issuecomment-156720363

flyingzebras commented 8 years ago

@gorhill: "The reason is simply that FF 38 API does not support process message managers, which is required in the current implementation of inline script tag filtering."

Goderw commented 8 years ago

I don't know exactly if my posting refers to this topic, but I think my experience comes along with an inline script handling "issue", too: For example www.arcor.de and www.focus.de both show ads in the upper corner of the page if scripts for the same site are allowed. The ads are .jpgs (with a link inserted?). They are hosted on the same server as the page itself. They are individual numbered each visit via script call at the end of the page loading. Am I right?

Browser: Firefox 38.04 ESR OS: Linux Ublock Origin: 1.3.2

gorhill commented 8 years ago

@Goderw You need to use a more recent version of Firefox. Not sure which version introduced process message managers.

I do not plan to change the code to make this works for less recent versions of Firefox.

Goderw commented 8 years ago

Ok, thanks for your reply.

One question still remains: Is THIS the only side effect of "lag of process message managers" if I use FF 38.4 ESR until the next ESR version will be released (in May 2016)... and my other security concerns lead to use ublock origin in other ways leave unimpaired?

In other words: Is it by now "recommended" to switch to FF 42 due further improvements of uBlock Origin code in the nearest future so that additional possible misbehavior (security related) might comes up?

Why? Because I have to use several "programs" which need the ESR feature urgently.

Thanks for your effort!

gorhill commented 8 years ago

Is THIS the only side effect of "[lack] of process message managers"

Yes, this is the only side effect. That specific message manager is not used anywhere else in uBO.

Blocking inline script wholesale can be tried as a fall back way to prevent those self-defacing ads, but side effects could be that other useful things are also blocked on the site -- for example it looks like embedded videos won't play on focus.de when blocking inline script.

Goderw commented 8 years ago

Phew! Good news.

Thank you very much for this extension and your helpfulness !

gorhill commented 8 years ago

Actually, reading more carefully the documentation, I realize I missed this passage in the process message managers section:

From Firefox 38 onwards, you can also use a parent process message manager to [...]

The difference with current Firefox is that the managers have to be looked up from Components.classes, they were not available directly from Services back then -- but they are available, which means I should be able to make inline script tag filtering to work for Firefox 38.

ghost commented 8 years ago

FYI: Adguard even works with < Firefox 38 and other browsers

http://forum.adguard.com/showthread.php?7679-Resolved-Spiegel-de

gorhill commented 8 years ago

FYI: Adguard even works with < Firefox 38 and other browsers

I do not plan to support Adguard's javascript injection filters -- I am not comfortable with giving that kind of power to filter list maintainers (see _"The real threat, customjs" section).

Edit: anyway the issue here is not specifically Adguard's javascript injection filters, it's the use of one single sync messaging when the page first load, to reliably filter inline script tags. Using an async message makes the filtering unreliable (#756).

Goderw commented 8 years ago

Thanks for the fix!

Just to be sure: You (gorhill) say, inline script blocking makes those self-defacing ads disappear... and on the other hand it prevents sometimes embedded videos from being displayed?! Ok, but is it possible to play embedded videos despite of that. Or is there no way around? Either no "inline script ads" or "embedded videos will be displayed"?

gorhill commented 8 years ago

Let's not confuse wholesale inline script filtering with inline script tag filtering. The former will block all inline scripts in a page. The latter will block specific inline script tag(s).

Videos on focus.de play fine with inline script tag filtering. They do not with wholesale inline script filtering.

Goderw commented 8 years ago

Ok, I was not aware of this delicacy. Next time I read accurately! :)

gorhill commented 8 years ago

Found out this fix works also for Firefox ESR 31.

flyingzebras commented 8 years ago

@gorhill uBO worked fine with the pornhub.com inline script filter in IceCat 31.

flyingzebras commented 8 years ago

@gorhill uBlock Origin v1.3.4rc2 blocked popunders for pornhub.com and tube8.com but not for mofosex.com. I just tried these sites.

gorhill commented 8 years ago

but not for mofosex.com

Not an inline script tag filter issue. This is an EasyList issue, try:

||sx.trhnt.com/sx.tr.js$script
flyingzebras commented 8 years ago

I can confirm that you are right.