From 02b4d149e31d2db2dc8005a982d105d52e456c7c Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Fri, 13 Nov 2020 08:30:43 -0500 Subject: [PATCH] Do not skip querypruning when no-strict-blocking is true Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1341 --- src/js/traffic.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/traffic.js b/src/js/traffic.js index 01015246e..224b956cd 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -137,7 +137,8 @@ const onBeforeRootFrameRequest = function(fctxt) { let logData; // If the site is whitelisted, disregard strict blocking - if ( µb.getNetFilteringSwitch(requestURL) === false ) { + const trusted = µb.getNetFilteringSwitch(requestURL) === false; + if ( trusted ) { result = 2; if ( loggerEnabled ) { logData = { engine: 'u', result: 2, raw: 'whitelisted' }; @@ -216,7 +217,12 @@ const onBeforeRootFrameRequest = function(fctxt) { // https://github.com/uBlockOrigin/uBlock-issues/issues/760 // Redirect non-blocked request? - if ( result === 0 && pageStore !== null && snfe.hasQuery(fctxt) ) { + if ( + result !== 1 && + trusted === false && + pageStore !== null && + snfe.hasQuery(fctxt) + ) { pageStore.redirectNonBlockedRequest(fctxt); }