Files
nuclei/pkg/protocols
Dwi Siswanto 0eb87c2621 fix(js): mysql panic due to missing executionId in ctx
The `connectWithDSN` func used `db.Exec()` which
implicitly uses `context.Background()`[1]. This
caused the registered "nucleitcp" dialer
callback to receive a ctx missing the
`executionId`, leading to a panic during type
assertion.

Refactor `connectWithDSN` to accept `executionId`
explicitly and use it to create a `context` for
`db.PingContext()` (yeah, instead of `db.Exec()`).
And, add a defensive check in the dialer callback
to handle nil values gracefully.

Fixes #6733 regression introduced in #6296.

[1]: "Exec uses `context.Background` internally" -
     https://pkg.go.dev/database/sql#DB.Exec.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-12-25 17:16:49 +07:00
..
2025-11-02 21:24:27 +07:00
2025-10-10 17:32:54 +02:00
2025-08-25 13:36:58 +05:30