github gorhill/uBlock 0.8.9.2

latest releases: 1.57.3b8, 1.57.3b7, 1.57.3b6...
3 years ago

[Release notes salvaged from https://github.com/uBlock-LLC/uBlock/releases/tag/0.8.9.2]

This version of µBlock, 0.8.9.2, is identical to 0.8.9.1 for every browser except Safari.


Changes (only 1!):

  • µBlock now implements a workaround older Safari versions don't crash. As tested, this version of µBlock is known to work on 6.1, 7.x and 8.x.

How does this workaround change µBlock on Safari 8.x?

This should not affect µBlock's functionality at all in Safari 8 and later.

How does this workaround change µBlock on Safari 7.x and older?

In those older versions of Safari, the only difference with the default configuration is that two of the pre-packaged filter lists (namely Peter's Lowe's Ad Server List and 'Malware Domains') will have to be downloaded instead.

By design, this download happens automatically by default, but you can always click manually trigger the download by clicking Update Now in µBlock's Preferences -> 3rd-party filters.


What was the problem?

What follows is written by me, µBlock's Safari-guy; it doesn't necessarily express the views of all project collaborators.

The problem was (and still is) a bug in Safari 7 and earlier. The bug still exists in those older versions of Safari, and any extension that may happen to trigger it will cause those crashes.

Hopefully Apple will push a fix to those older versions of Safari (otherwise, some other extension and its users may encounter this in the future).

If you're curious about the bug, read on.

Specifics of bug

µBlock ships pre-packaged with copies of the filter lists it supports — that way, it has something to use for the lists enabled by default right away without having to download them from the servers first.

Those pre-packaged filter list files are named similarly to what their maintainers named them. For instance, EasyPrivacy can be accessed at easylist-downloads.adblockplus.org/easyprivacy.txt, so the filename for the pre-packaged version is easyprivacy.txt.

When µBlock is installed and it launches, it loads those files using simple XHR requests. Safari, like most browsers, gives us a way to do that: you use safari.extension.baseURI followed by the path to your file, and voilà, you can load a file you packaged with your extension.

This indeed works well with most things, including our example above (easyprivacy.txt). In fact, it seems like since Safari 8.0, it works perfectly. No problems whatsoever.

But Safari 7.x crashes miserably. This is already odd: a JavaScript program shouldn't be able to crash your whole browser no matter what.

After doing much investigation via VNC on a virtual machine that's actually running Mavericks, I found the problem. Two of the default filter lists:

those two lists were pre-packaged in files that shipped with µBlock: justdomains and serverlist. No .txt suffix.

Yes.

Safari 7.x crashes if you try to load a file from your package whose name happens not to have an 'extension'.

easylist.txt? Dandy. justdomains? Boom.

Correct: it's not just a mere stray exception thrown, the whole browser crashes.

I think it was fair to conclude this was a browser bug. It's not due to negligence on µBlock's part.

With the obscurity and nature of this bug considered, this problem with µBlock for Safari was the result of an unfortunate incidental set of circumstances, unavoidable without the hindsight we have today.

As the Safari maintainer (just personally), I hope you understand. Enjoy µBlock.

Download µBlock 0.8.9.2 for Safari

Don't miss a new uBlock release

NewReleases is sending notifications on new releases.