crypto: Add more keylen sanity checks in pbkdf2#3029
Closed
johannhof wants to merge 1 commit intonodejs:masterfrom
Closed
crypto: Add more keylen sanity checks in pbkdf2#3029johannhof wants to merge 1 commit intonodejs:masterfrom
johannhof wants to merge 1 commit intonodejs:masterfrom
Conversation
Author
|
cc @bnoordhuis |
b9eaa43 to
d9d05fc
Compare
Member
Member
|
/cc @nodejs/collaborators - can I have one more LGTM? |
test/parallel/test-crypto-pbkdf2.js
Outdated
Contributor
|
One minor nit, otherwise LGTM |
test/parallel/test-crypto-pbkdf2.js
Outdated
Contributor
There was a problem hiding this comment.
Check at least the type of error.
Member
|
LGTM, except nits from @thefourtheye |
issue nodejs#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: nodejs#2987
d9d05fc to
5550518
Compare
Author
|
@indutny @thefourtheye @mscdex @bnoordhuis Updated, thanks for the remarks :) |
Contributor
|
LGTM |
Author
|
@bnoordhuis wanna merge? :) |
thefourtheye
pushed a commit
that referenced
this pull request
Sep 25, 2015
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: #2987 PR-URL: #3029 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Contributor
|
Thanks @johannhof :-) Landed in 6df47d6 |
rvagg
pushed a commit
that referenced
this pull request
Sep 30, 2015
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: #2987 PR-URL: #3029 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This was referenced Sep 30, 2015
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: #2987