Commit 4c8d96bc authored by Johann's avatar Johann Committed by Rod Vagg
Browse files

crypto: add more keylen sanity checks in pbkdf2

issue #2987 makes the point that crypto.pbkdf2 should not fail silently
and accept invalid but numeric values like NaN and Infinity. We already
check if the keylen is lower than 0, so extending that to NaN and
Infinity should make sense.

Fixes: https://github.com/nodejs/node/issues/2987

PR-URL: https://github.com/nodejs/node/pull/3029


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarBrian White <mscdex@mscdex.net>
Reviewed-By: default avatarFedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: default avatarSakthipriyan Vairamani <thechargingvolcano@gmail.com>
parent 798dad24
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment