Files
nuclei/integration_tests/protocols/javascript/no-port-args.yaml
Dwi Siswanto 746a05dac5 fix(javascript): restore exec for templates w/o Port arg (#6709)
Restore backwards compat for JavaScript protocol
templates that omit the `Port` argument.
Regression was introduced in f4f2e9f2, which
removed the fallback for empty `Port` in
`(*Request).ExecuteWithResults`, causing templates
without `Port` to be silently skipped.

Now, if no `Port` is specified, the engine
executes the JavaScript block using the target
URL's port.

Fixes #6708.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-12-17 22:07:14 +07:00

24 lines
544 B
YAML

id: javascript-no-port-args
info:
name: JavaScript Template Without Port Args
author: dwisiswant0
severity: info
description: |
Test backwards compatibility for JavaScript templates without Port in args.
Templates should execute even when Port arg is not explicitly specified.
javascript:
- code: |
// Simple JavaScript code that does not require Port
let result = "executed";
Export(result);
args:
TestArg: "test-value"
matchers:
- type: dsl
dsl:
- success == true