From 3e1cd279433b845bd2a064e582926ff8b23254fb Mon Sep 17 00:00:00 2001 From: Ramana Reddy <90540245+RamanaReddy0M@users.noreply.github.com> Date: Mon, 15 Jul 2024 04:27:12 -0700 Subject: [PATCH] Fix stop-at-first-match in headless mode fuzzing (#5330) --- pkg/protocols/headless/request.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/protocols/headless/request.go b/pkg/protocols/headless/request.go index 05bf5d3548..973dfa642a 100644 --- a/pkg/protocols/headless/request.go +++ b/pkg/protocols/headless/request.go @@ -215,6 +215,10 @@ func (request *Request) executeRequestWithPayloads(input *contextargs.Context, p } dumpResponse(event, request.options, responseBody, input.MetaInput.Input) + shouldStopAtFirstMatch := request.StopAtFirstMatch || request.options.StopAtFirstMatch || request.options.Options.StopAtFirstMatch + if shouldStopAtFirstMatch && event.HasOperatorResult() { + return types.ErrNoMoreRequests + } return nil }