From 2a6c1d30b4a4edb20dd28497966dfba7e5ff395e Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 14 Aug 2023 13:39:27 -0400 Subject: [PATCH] Fix regression in vAPI.warSecret guard code Related commit: https://github.com/gorhill/uBlock/commit/bf591d93fb --- platform/common/vapi-background.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/platform/common/vapi-background.js b/platform/common/vapi-background.js index 334b52050..f0cbcdbb7 100644 --- a/platform/common/vapi-background.js +++ b/platform/common/vapi-background.js @@ -1185,13 +1185,11 @@ vAPI.messaging = { const guard = details => { const match = reSecret.exec(details.url); - if ( match === null ) { return; } + if ( match === null ) { return { cancel: true }; } const secret = match[1]; if ( longSecrets.includes(secret) ) { return; } const pos = shortSecrets.indexOf(secret); - if ( pos === -1 ) { - return { cancel: true }; - } + if ( pos === -1 ) { return { cancel: true }; } shortSecrets.splice(pos, 1); };