summaryrefslogtreecommitdiff
path: root/background
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-03-09 18:43:06 +0100
committerWojtek Kosior <koszko@koszko.org>2022-03-10 11:43:59 +0100
commitbace213c4f441549e9c54ef1fd6212ab0b75cb2b (patch)
tree34f7514fec9f00feec80653585c6ed4a75ad9728 /background
parenteae2250e77c53c5e16725b591f51f5d197ac4efa (diff)
downloadbrowser-extension-bace213c4f441549e9c54ef1fd6212ab0b75cb2b.tar.gz
browser-extension-bace213c4f441549e9c54ef1fd6212ab0b75cb2b.zip
fix chromium synchronous policy fetching for file:/// URLs
Diffstat (limited to 'background')
-rw-r--r--background/webrequest.js3
1 files changed, 2 insertions, 1 deletions
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};
}