summaryrefslogtreecommitdiff
path: root/src/xss
diff options
context:
space:
mode:
authorhackademix2019-08-02 18:03:49 +0200
committerhackademix2019-08-02 18:03:49 +0200
commit845b0ee7dd1e90beea9af3d5660613fa19726c43 (patch)
treeddabe52ac00e66860419b14053972a4a68f6080a /src/xss
parent207bd159c5ae99b03883d2f938ab200e527791c3 (diff)
downloadnoscript-845b0ee7dd1e90beea9af3d5660613fa19726c43.tar.gz
noscript-845b0ee7dd1e90beea9af3d5660613fa19726c43.tar.xz
noscript-845b0ee7dd1e90beea9af3d5660613fa19726c43.zip
[XSS] Enable InjectionChecker logging when debugging mode is on.
Diffstat (limited to 'src/xss')
-rw-r--r--src/xss/InjectionChecker.js7
-rw-r--r--src/xss/XSS.js1
2 files changed, 4 insertions, 4 deletions
diff --git a/src/xss/InjectionChecker.js b/src/xss/InjectionChecker.js
index a536aaf..4f8a910 100644
--- a/src/xss/InjectionChecker.js
+++ b/src/xss/InjectionChecker.js
@@ -42,10 +42,10 @@ XSS.InjectionChecker = (async () => {
fuzzify: fuzzify,
syntax: new SyntaxChecker(),
- _log: function(msg, i) {
+ _log: function(msg, iterations) {
if (msg) msg = this._printable(msg);
- if (t) msg += " - TIME: " + (this.timing.elapsed);
- if (i) msg += " - ITER: " + i;
+ msg = `${msg} - TIME: ${this.timing.elapsed}`;
+ if (iterations) msg = `${msg} - ITER: ${iterations}`;
debug("[InjectionChecker]", msg);
},
@@ -1194,6 +1194,5 @@ XSS.InjectionChecker = (async () => {
},
};
- // InjectionChecker.logEnabled = true;
return InjectionChecker;
})();
diff --git a/src/xss/XSS.js b/src/xss/XSS.js
index 5b93921..14a2ad6 100644
--- a/src/xss/XSS.js
+++ b/src/xss/XSS.js
@@ -254,6 +254,7 @@ var XSS = (() => {
await include("/xss/InjectionChecker.js");
let ic = new (await this.InjectionChecker)();
+ ic.logEnabled = ns.local.debug;
let {timing} = ic;
timingsMap.set(request.id, timing);
timing.fatalTimeout = true;