summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhackademix2019-03-27 23:48:27 +0100
committerhackademix2019-03-28 13:04:36 +0100
commitc806c6bbff7e551fd24cf7c456c812b7c54007b5 (patch)
tree64bb300230fc09a8f52b1282ce990f7edf5c4ada /src
parent5327505fbabfb6a98110f1dea208be4405c01098 (diff)
downloadnoscript-c806c6bbff7e551fd24cf7c456c812b7c54007b5.tar.gz
noscript-c806c6bbff7e551fd24cf7c456c812b7c54007b5.tar.xz
noscript-c806c6bbff7e551fd24cf7c456c812b7c54007b5.zip
Work-around for potential issues with legacy prefs.
Diffstat (limited to 'src')
-rw-r--r--src/xss/Exceptions.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/xss/Exceptions.js b/src/xss/Exceptions.js
index 4e80c39..24fc480 100644
--- a/src/xss/Exceptions.js
+++ b/src/xss/Exceptions.js
@@ -50,9 +50,11 @@ XSS.Exceptions = (() => {
}
// destination or @source matching legacy regexp
- if (this.legacyExceptions.test(unescapedDest) &&
- !this.isBadException(destObj.hostname) ||
- this.legacyExceptions.test("@" + unescape(srcUrl))) {
+ if (this.legacyExceptions &&
+ (this.legacyExceptions.test(unescapedDest) &&
+ !this.isBadException(destObj.hostname) ||
+ this.legacyExceptions.test("@" + unescape(srcUrl))
+ )) {
logEx("Legacy exception", this.legacyExceptions);
return true;
}