aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-03-10 11:42:44 +0100
committerWojtek Kosior <koszko@koszko.org>2022-03-10 11:43:59 +0100
commit26459fb4ca619b675729b4bea7714914631dbb86 (patch)
treed7634ed255ee3bdbde5503c5b88b2d9e8368ab97
parent8781ee152d1b0a52dfa476ee5c9a5b2b9fbd6d06 (diff)
downloadbrowser-extension-26459fb4ca619b675729b4bea7714914631dbb86.tar.gz
browser-extension-26459fb4ca619b675729b4bea7714914631dbb86.zip
treat "view-source:" pages as privileged
-rw-r--r--common/misc.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/misc.js b/common/misc.js
index c06052a..e609fe0 100644
--- a/common/misc.js
+++ b/common/misc.js
@@ -85,8 +85,8 @@ const csp_header_regex =
* case of `file://' protocol).
*/
#IF MOZILLA
-const priv_reg = /^moz-extension:\/\/|^about:|^file:\/\/[^?#]*\/([?#]|$)/;
+const priv_reg = /^moz-extension:\/\/|^about:|^view-source:|^file:\/\/[^?#]*\/([?#]|$)/;
#ELIF CHROMIUM
-const priv_reg = /^chrome(-extension)?:\/\/|^about:|^file:\/\/[^?#]*\/([?#]|$)/;
+const priv_reg = /^chrome(-extension)?:\/\/|^about:|^view-source:|^file:\/\/[^?#]*\/([?#]|$)/;
#ENDIF
#EXPORT url => priv_reg.test(url) AS is_privileged_url