From b465995dfab64555db3eab146697ab1cee3f576e Mon Sep 17 00:00:00 2001 From: Krzysztof Modras Date: Wed, 25 Oct 2023 17:52:50 +0200 Subject: [PATCH] Adblocker: apply whitelisting to push injections --- modules/adblocker/sources/adblocker.es | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/adblocker/sources/adblocker.es b/modules/adblocker/sources/adblocker.es index 994dcf5..d06214d 100644 --- a/modules/adblocker/sources/adblocker.es +++ b/modules/adblocker/sources/adblocker.es @@ -207,6 +207,15 @@ export default class Adblocker { return skip('trusted page'); } + // Make sure request is not whitelisted (applies on request context) + if (this.whitelistChecks.length !== 0) { + for (let i = 0; i < this.whitelistChecks.length; i += 1) { + if (this.whitelistChecks[i](details) === true) { + return false; + } + } + } + return true; }