From 83979c532e04c5afc53ecad25f6662ef7ae72874 Mon Sep 17 00:00:00 2001 From: hackademix Date: Sat, 24 Nov 2018 23:43:32 +0100 Subject: Allow extensions to perform origin-less fetching and framing (issue #41). --- src/bg/RequestGuard.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/bg') diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js index 55a78c8..8214a3d 100644 --- a/src/bg/RequestGuard.js +++ b/src/bg/RequestGuard.js @@ -264,7 +264,10 @@ var RequestGuard = (() => { if (policyType) { let {url, originUrl, documentUrl} = request; if (("fetch" === policyType || "frame" === policyType) && - (url === originUrl && originUrl === documentUrl || + (((!originUrl || url === originUrl) && originUrl === documentUrl + // some extensions make them both undefined, + // see https://github.com/eight04/image-picka/issues/150 + ) || INTERNAL_SCHEME.test(originUrl)) ) { // livemark request or similar browser-internal, always allow; -- cgit v1.2.3