Files
nuclei/pkg/protocols/http/raw
Dwi Siswanto d5e65d1afe fix(raw): handle full URLs in unsafe raw requests
Previously, when using `unsafe: true` with full
URLs (e.g., `GET http://example.com/path HTTP/1.1`),
the `Parse` func would treat the full URL as a
relative path, resulting in malformed requests
like `GET /http://example.com/path HTTP/1.1`.

This occurred because the full URL handling
logic was only executed for non-unsafe requests,
causing unsafe requests with full URLs to fall
through to the unsafe case which wasn't designed
to handle them.

Changes:
* Extract full URL handling before mode-specific
  logic runs.
* Convert full URLs to relative paths for both
  safe and unsafe modes.
* Update `UnsafeRawBytes` with the correct
  relative path when unsafe is true.
* Ensure path merging works correctly with
  `disable-path-automerge`.

This fix maintains backward compatibility while
properly supporting the previously broken
combination of unsafe mode with full URLs.

Fixes #6558.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-11-05 22:26:21 +07:00
..
2023-10-17 17:44:13 +05:30