Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

Requests showing up as blocked and allowed in Statistics Request log #242

Closed
my-password-is-password opened this issue Apr 25, 2014 · 2 comments

Comments

@my-password-is-password
Copy link
Contributor

In Ubiquitous rules, I'm using these 2 lists

assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt
assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt

In Statistics tab, I remember the last 200 HTTP requests per page.

  1. Go to http://www.wired.com/
  2. Use the preset recipe for Wired
  3. Refresh http://www.wired.com/

Scripts blocked by adblock+ filters shows up as blocked and then shows again as allowed. This seems to only happen with scripts.

@gorhill
Copy link
Owner

gorhill commented Apr 25, 2014

Hmm good one.

This is caused by the contentscripthandler.js code which lookup script tags, and test them against matrix filtering only and not ABP filtering. I need to coalesce matrix and ABP filtering in one function so that both filtering paths are properly evaluated (if switched on) from everywhere instead of just in traffic.js:

    // Block request?
    var scopeKey = httpsb.temporaryScopeKeyFromPageURL(pageURL);
    var block = httpsb.evaluateFromScopeKey(scopeKey, type, requestHostname).charAt(0) === 'r';
    var reason;

    // Block using ABP filters?
    if ( block === false ) {
        var scope = httpsb.temporaryScopeFromScopeKey(scopeKey);
        if ( scope.abpFiltering === true ) {
            block = httpsb.abpFilters.matchString(requestURL, pageStats.pageDomain, requestHostname);
            if ( block !== false ) {
                pageStats.abpBlockCount += 1;
                httpsb.abpBlockCount += 1;
                reason = 'ABP filter: ' + block;
            }
        }
    }

@gorhill
Copy link
Owner

gorhill commented Apr 25, 2014

Also, something unrelated but highlighted by this bug and that has always bothered me, script tags are reported twice when inline js allowed. I will entered another issue for this: #243.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants