[Webkit-unassigned] [Bug 151649] New: Content Blocker - blocked requests should not seem successful to requester

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 29 15:54:30 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151649

            Bug ID: 151649
           Summary: Content Blocker - blocked requests should not seem
                    successful to requester
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: am at adguard.com

There is an issue with the way content blockers present blocked requests to the requesters.

Usually (e.g. for all other browsers) when request is blocked by add-on or extension it looks like an error to the page code. For instance, "onerror" is called for XMLHttpRequest and "element.onerror" callback is called for the DOM element if it's load is blocked by the ad blocker.

This is a common behavior and it's handled by web developers.

In case of Safari content blocker "onerror" event is not raised and it may seem that request is successful while it is not.

Here is an example.

This is a rule blocking access to visualwebsiteoptimizer.com domain.
This domain is a known tracker so you can see this rule in all "privacy" related filter lists like EasyPrivacy and such.
[
    {
        "trigger": {
            "url-filter": "^https?://[^.]+\\.?visualwebsiteoptimizer\\.com[/:&?]?",
            "load-type": [
                "third-party"
            ]
        },
        "action": {
            "type": "block"
        }
    }
]

But it can't be used in Safari because the "silent" blocking breaks entire website which use visualwebsiteoptimizer.com. Examples of such websites: 
http://info.singtel.com
http://www.harveynorman.com.au

Here is a code used by them:
http://pastebin.com/awYa9s95

As you can see they handle "onerror" callback, but it's not fired in Safari so the "body" element remains hidden.

Btw, this issue also causes significant delays when ads are blocked on Youtube. They also are waiting for "onerror" callback to fire, but as it is not fired, video does not start until "ontimeout" is fired.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151129/02047472/attachment.html>


More information about the webkit-unassigned mailing list