Redirected response matches are lost when executed from Flow #4443
Labels
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
Milestone
Nuclei version:
Nuclei Engine Version: v3.0.4
Current Behavior:
When executed from Flow, it outputs only the matches on the first request. Matches from further redirected responses are not shown.
Expected Behavior:
Output the matches for all the resonses through a redirect chain, just like when it's running normally.
Steps To Reproduce:
Run it with
./nuclei -disable-update-check -target "https://httpbin.org/redirect-to?url=https%3A%2F%2Fdocs.projectdiscovery.io%2F" -templates flow_bug.yaml -v -matcher-status -follow-redirects
Without using
flow
it gives the expected result (the 200 status matcher got hit):But when run it with
flow: http();
:-matcher-status
flag, it outputs thefailed
statusfailed
status due to the-matcher-status
flag is printed, so it seems that it hits the matcher, but the result from those later responses are lost somewhere...Refs:
https://docs.projectdiscovery.io/templates/protocols/http/basic-http
https://github.com/projectdiscovery/nuclei/blob/dev/pkg/tmplexec/flow/flow_internal.go
https://github.com/projectdiscovery/nuclei/blob/dev/pkg/tmplexec/generic/exec.go
Side note: when following a HTTP redirection, Nuclei outputs the final URL, which is not so practical, I think, because if I run it with a big list of URLs, I need to do additional work to find out which resulted in that.
The text was updated successfully, but these errors were encountered: