-
Notifications
You must be signed in to change notification settings - Fork 41
Replace buffer-equal-constant-time
with crypto.timingSafeEqual
#52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace buffer-equal-constant-time
with crypto.timingSafeEqual
#52
Conversation
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 <[email protected]>
I've flagged and raised this internally to address. |
…ual when available Closes #52 Co-authored-by: Tango992
How long does it take for a version update? |
* 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 <[email protected]> --------- Co-authored-by: Filip Skokan <[email protected]>
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