From bace213c4f441549e9c54ef1fd6212ab0b75cb2b Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 9 Mar 2022 18:43:06 +0100 Subject: fix chromium synchronous policy fetching for file:/// URLs --- background/webrequest.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/background/webrequest.js b/background/webrequest.js index 446ad45..faff837 100644 --- a/background/webrequest.js +++ b/background/webrequest.js @@ -128,7 +128,8 @@ function on_before_request(details) if (match) { const queried_url = decodeURIComponent(match[1]); - if (details.initiator && !queried_url.startsWith(details.initiator)) { + if (details.initiator && details.initiator !== "null" && + !queried_url.startsWith(details.initiator)) { console.warn(`Haketilo: Blocked suspicious query of '${queried_url}' by '${details.initiator}'. This might be the result of page fingerprinting the browser.`); return {cancel: true}; } -- cgit v1.2.3