[Pkg-mozext-commits] [no-resource-uri-leak] 08/09: Fixed unintentional whitelisting
Hema Prathaban
hemaprathaban-guest at moszumanska.debian.org
Tue Jul 4 17:19:13 UTC 2017
This is an automated email from the git hooks/post-receive script.
hemaprathaban-guest pushed a commit to branch upstream
in repository no-resource-uri-leak.
commit 92b24f43cab661b02b54d01879ea4e79e3e39530
Author: nord-stream <nord-stream at ochaken.jp.eu.org>
Date: Mon Jul 25 09:53:41 2016 +0000
Fixed unintentional whitelisting
---
src/main.js | 9 +++++++--
version_info | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/main.js b/src/main.js
index 6692acf..d6fdd7a 100644
--- a/src/main.js
+++ b/src/main.js
@@ -40,6 +40,11 @@ const PREF_DEBUG_ENABLED = 'debug.enabled';
const _$prefs = require ('sdk/simple-prefs').prefs;
+const extractListItems = str =>
+ (items =>
+ (items[items.length - 1] || items.length--, items))
+ (String (str).split (/\s*,\s*/));
+
const update = $prefs => enablePolicy ({__proto__: null
,enableDebug: !!$prefs[PREF_DEBUG_ENABLED]
,blockResourceURIs: !!$prefs[PREF_URI_RESOURCE_BLOCKED]
@@ -47,9 +52,9 @@ const update = $prefs => enablePolicy ({__proto__: null
,enableRedirectMasking: !!$prefs[PREF_REDIRECT_MASKED]
,restrictAboutPages: !!$prefs[PREF_RESTRICT_ABOUT]
,exposedResourceDomains:
- String ($prefs[PREF_URI_RESOURCE_WHITELIST]).split (/[,\s]+/)
+ extractListItems ($prefs[PREF_URI_RESOURCE_WHITELIST])
,exposedChromeDomains:
- String ($prefs[PREF_URI_CHROME_WHITELIST]).split (/[,\s]+/)
+ extractListItems ($prefs[PREF_URI_CHROME_WHITELIST])
});
update (_$prefs);
diff --git a/version_info b/version_info
index 5b2b92d..b360c94 100644
--- a/version_info
+++ b/version_info
@@ -22,7 +22,7 @@
addon_id="no-resource-uri-leak"
# Canonical version of the addon (may be converted into different formats on build)
-addon_version="1.0.0"
+addon_version="1.0.1"
# Alpha versions (may not be feature complete): x.y.z~a1, x.y.z~a2, ...
# Beta versions (feature-frozen): x.y.z~b1, x.y.z~b2, ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/no-resource-uri-leak.git
More information about the Pkg-mozext-commits
mailing list