From c806c6bbff7e551fd24cf7c456c812b7c54007b5 Mon Sep 17 00:00:00 2001 From: hackademix Date: Wed, 27 Mar 2019 23:48:27 +0100 Subject: Work-around for potential issues with legacy prefs. --- src/xss/Exceptions.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/xss') 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; } -- cgit v1.2.3