[XSS] Skip naps when InjectionChecker runs in its own worker.

This commit is contained in:
hackademix 2021-01-15 17:26:43 +01:00
parent 17f3bfd14b
commit 445d7ff1af
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ class Timing {
throw new TimingException(`Timing: exceeded ${this.longTime}ms timeout`);
}
this.calls = 0;
await Timing.sleep(this.pauseTime);
if (this.pauseTime > 0) await Timing.sleep(this.pauseTime);
this.lastPause = Date.now();
return true;
}

View File

@ -36,7 +36,7 @@ include("InjectionChecker.js");
let {timing} = ic;
timingsMap.set(request.requestId, timing);
timing.fatalTimeout = true;
timing.pauseTime = 0; // skip the default 20ms nap
let postInjection = xssReq.isPost &&
request.requestBody && request.requestBody.formData &&