From 64dc5f780718324527f94ab6f2b2a82409882ab0 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Sat, 31 Oct 2020 13:47:35 -0400 Subject: [PATCH] Fix wrongly reported network filter options in logger Regression from: - https://github.com/gorhill/uBlock/commit/1e2eb037e5b4754feb4a40519951b3e7a73d545d Related feedback: - https://github.com/gorhill/uBlock/commit/1e2eb037e5b4754feb4a40519951b3e7a73d545d#commitcomment-43759481 --- src/js/static-net-filtering.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index daa36b2e5..1cc8323af 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -228,12 +228,12 @@ const toLogDataInternal = function(categoryBits, tokenHash, iunit) { isRegex: false, }; filterUnits[iunit].logData(logData); - if ( categoryBits & 0x002 ) { + if ( (categoryBits & Important) !== 0 ) { logData.options.unshift('important'); } - if ( categoryBits & 0x008 ) { + if ( (categoryBits & ThirdParty) !== 0 ) { logData.options.unshift('3p'); - } else if ( categoryBits & 0x004 ) { + } else if ( (categoryBits & FirstParty) !== 0 ) { logData.options.unshift('1p'); } const type = categoryBits & TypeBitsMask; @@ -248,7 +248,7 @@ const toLogDataInternal = function(categoryBits, tokenHash, iunit) { ) { raw += '*'; } - if ( categoryBits & 0x001 ) { + if ( (categoryBits & AllowAction) !== 0 ) { raw = '@@' + raw; } if ( denyallow.length !== 0 ) {