Skip to content

Commit 445d7ff

Browse files
committed
[XSS] Skip naps when InjectionChecker runs in its own worker.
1 parent 17f3bfd commit 445d7ff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/Timing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Timing {
3131
throw new TimingException(`Timing: exceeded ${this.longTime}ms timeout`);
3232
}
3333
this.calls = 0;
34-
await Timing.sleep(this.pauseTime);
34+
if (this.pauseTime > 0) await Timing.sleep(this.pauseTime);
3535
this.lastPause = Date.now();
3636
return true;
3737
}

src/xss/InjectionCheckWorker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ include("InjectionChecker.js");
3636

3737
let {timing} = ic;
3838
timingsMap.set(request.requestId, timing);
39-
timing.fatalTimeout = true;
39+
timing.pauseTime = 0; // skip the default 20ms nap
4040

4141
let postInjection = xssReq.isPost &&
4242
request.requestBody && request.requestBody.formData &&

0 commit comments

Comments
 (0)