Replace buffer-equal-constant-time with crypto.timingSafeEqual#52
Replace buffer-equal-constant-time with crypto.timingSafeEqual#52panva merged 2 commits intoauth0:masterfrom Tango992:omit-buffer-equal-constant-time-dependency
buffer-equal-constant-time with crypto.timingSafeEqual#52Conversation
buffer-equal-constant-time uses SlowBuffer that has been removed on Node 24
|
Both runtime-deprecation and EOL of said Node.js API happened in the same major, that shouldn't have happened. nodejs/node#58211 |
|
@Tango992 can you apply this patch to your PR please? 0001-refactor-replace-buffer-equal-constant-time-with-cry.patch Edit: gist |
…ersions where `timingSafeEqual` is not available. Co-authored-by: Filip Skokan <panva.ip@gmail.com>
|
I've flagged and raised this internally to address. |
…ual when available Closes #52 Co-authored-by: Tango992
* refactor: replace buffer-equal-constant-time with crypto.timingSafeEqual buffer-equal-constant-time uses SlowBuffer that has been removed on Node 24 * refactor: falls back to `buffer-equal-constant-time` for older Node versions where `timingSafeEqual` is not available. Co-authored-by: Filip Skokan <panva.ip@gmail.com> --------- Co-authored-by: Filip Skokan <panva.ip@gmail.com>
|
We've released patched versions of the Running |
|
@Tango992 thank you |
|
Awesome! Thank you as well @panva |
This fixes a fatal error on the just-released node 24 coming from this transitive dependency: auth0/node-jwa#52.
buffer-equal-constant-time uses SlowBuffer that has been removed on Node 24
By submitting a PR to this repository, you agree to the terms within the Auth0 Code of Conduct. Please see the contributing guidelines for how to create and submit a high-quality PR for this repo.
Description
This pull request addresses a compatibility issue with Node 24 by replacing the buffer-equal-constant-time package with the native crypto.timingSafeEqual method. buffer-equal-constant-time relies on SlowBuffer and has been removed on Node 24, causing this library to crash.
References
Fixes:
Testing
This PR doesn't change the code behavior and passed all tests.
Checklist