mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2026-01-31 15:53:10 +08:00
fix(http): race condition regression
The `race` condition directive was broken due to a strict dependency on `threads > 0` for parallel execution, causing templates with `race` directive enabled but no explicit threads to fall back to seq execution. This regression was introduced in v3.2.0 (#4868), which restricted parallel execution to only when `payloads` were present. Fixes #5713 to allow race conditions even w/o explicit `payloads`, and add a default thread count when race is enabled but threads is 0. Signed-off-by: Dwi Siswanto <git@dw1.io>
This commit is contained in:
@@ -501,7 +501,7 @@ func (request *Request) ExecuteWithResults(input *contextargs.Context, dynamicVa
|
||||
}
|
||||
|
||||
// verify if parallel elaboration was requested
|
||||
if request.Threads > 0 && len(request.Payloads) > 0 {
|
||||
if request.Threads > 0 && (len(request.Payloads) > 0 || request.Race) {
|
||||
return request.executeParallelHTTP(input, dynamicValues, callback)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user