Skip to content

fix(ext/node): return errors instead of panicking in ECDH ops - #714

Merged
nyannyacha merged 2 commits into
mainfrom
fix/ecdh-remove-panics
Jul 31, 2026
Merged

fix(ext/node): return errors instead of panicking in ECDH ops#714
nyannyacha merged 2 commits into
mainfrom
fix/ecdh-remove-panics

Conversation

@nyannyacha

@nyannyacha nyannyacha commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

op_node_ecdh_compute_secret and op_node_ecdh_compute_public_key
panicked via .expect() on malformed keys and todo!() on unknown
curves, taking down the runtime on user-supplied input. Both ops now
return a new EcdhError, which is mapped to TypeError for JS.

Ref: denoland/deno#33751

Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com

`op_node_ecdh_compute_secret` and `op_node_ecdh_compute_public_key`
panicked via `.expect()` on malformed keys and `todo!()` on unknown
curves, taking down the runtime on user-supplied input. Both ops now
return a new `EcdhError`, which is mapped to `TypeError` for JS.

Ref: denoland/deno#33751

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@nyannyacha nyannyacha changed the title fix(ext_node): return errors instead of panicking in ECDH ops fix(ext/node): return errors instead of panicking in ECDH ops Jul 31, 2026
@nyannyacha
nyannyacha requested a review from a team July 31, 2026 01:12
@nyannyacha
nyannyacha merged commit 47d04fd into main Jul 31, 2026
7 of 8 checks passed
@nyannyacha
nyannyacha deleted the fix/ecdh-remove-panics branch July 31, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants