From 1a90574124e099cfe8a56806e7fd4e79eb2b1f81 Mon Sep 17 00:00:00 2001 From: hackademix Date: Fri, 19 Jul 2019 19:17:41 +0200 Subject: Tiny CSP optimization (per spec, http: implies https:). --- src/common/CapsCSP.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/CapsCSP.js b/src/common/CapsCSP.js index 4b8fde6..6621c95 100644 --- a/src/common/CapsCSP.js +++ b/src/common/CapsCSP.js @@ -11,16 +11,16 @@ function CapsCSP(baseCSP = new CSP()) { blockedTypes.add("worker"); if (!blockedTypes.has("object")) { // data: URIs loaded in objects may run scripts - blockedTypes.add({name: "object", value: "http: https:"}); + blockedTypes.add({name: "object", value: "http:"}); } } - + if (!blockHttp) { // HTTP is blocked in onBeforeRequest, let's allow it only and block // for instance data: and blob: URIs for (let type of this.dataUriTypes) { if (blockedTypes.delete(type)) { - blockedTypes.add({name: type, value: "http: https:"}); + blockedTypes.add({name: type, value: "http:"}); } } } -- cgit v1.2.3