From 24aedad38c9d8fd97107031570a5bab007f3d0c2 Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 25 Mar 2020 14:58:34 +0100 Subject: Further refresh syntax parsing leniency (thanks insertscript). --- src/bg/ReportingCSP.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bg') diff --git a/src/bg/ReportingCSP.js b/src/bg/ReportingCSP.js index 08e7a90..fc08527 100644 --- a/src/bg/ReportingCSP.js +++ b/src/bg/ReportingCSP.js @@ -37,7 +37,7 @@ function ReportingCSP(reportURI, reportGroup) { } else if (blocker && /^(Location|Refresh)$/i.test(h.name)) { // neutralize any HTTP redirection to data: URLs, like Chromium let url = /^R/i.test(h.name) - ? h.value.replace(/^[^,;]*[,;]\W*url[^=]*=[^!#$%&()*+,/:;=?@[\]\w.,~-]*/i, "") : h.value; + ? h.value.replace(/^[^,;]*[,;](?:\W*url[^=]*=)?[^!#$%&()*+,/:;=?@[\]\w.,~-]*/i, "") : h.value; if (/^data:/i.test(url)) { h.value = h.value.slice(0, -url.length) + "data:"; } -- cgit v1.2.3