You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
crypto.pbkdf2Sync results in an abort with some arguments #44570
Replicated on macOS too with Node.js 18.8.0 and Node.js 16.17.0.
This problem does not exist in Node.js 14.20.0 which throws a TypeError instead:
Uncaught TypeError [ERR_CRYPTO_INVALID_DIGEST]: Invalid digest: str
at new NodeError (internal/errors.js:322:7)
at handleError (internal/crypto/pbkdf2.js:68:11)
at Object.pbkdf2Sync (internal/crypto/pbkdf2.js:48:3)
at REPL1:1:35
at Script.runInThisContext (vm.js:134:12)
at REPLServer.defaultEval (repl.js:566:29)
at bound (domain.js:421:15)
at REPLServer.runBound [as eval] (domain.js:432:12)
at REPLServer.onLine (repl.js:909:10)
at REPLServer.emit (events.js:412:35) {
code: 'ERR_CRYPTO_INVALID_DIGEST'
}
Activity
Trott commentedon Sep 8, 2022
@nodejs/crypto
Trott commentedon Sep 8, 2022
Replicated on macOS too with Node.js 18.8.0 and Node.js 16.17.0.
This problem does not exist in Node.js 14.20.0 which throws a
TypeErrorinstead:Trott commentedon Sep 8, 2022
Node.js 15.0.0 also aborts, so perhaps looking at the 15.0.0 changelog might help identify which change likely resulted in this.
Trott commentedon Sep 8, 2022
The two semver-major commits in 15.0.0 are dae283d96f and ba77dc8597 so maybe start with those?
@jasnell
crypto: restrict PBKDF2 args to signed int
tniessen commentedon Sep 8, 2022
Sigh. This is why unsigned values should not be stored as signed integers.
#44575
crypto: restrict PBKDF2 args to signed int
crypto: restrict PBKDF2 args to signed int
crypto: restrict PBKDF2 args to signed int
crypto: restrict PBKDF2 args to signed int
crypto: restrict PBKDF2 args to signed int