FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

crypto: Add more keylen sanity checks in pbkdf2 by johannhof · Pull Request #3029 · nodejs/node · GitHub

/ node Public

crypto: Add more keylen sanity checks in pbkdf2 - #3029

Closed
johannhof wants to merge 1 commit into
nodejs:masterfrom
johannhof:pbkdf2-fail-on-nan
Closed

crypto: Add more keylen sanity checks in pbkdf2#3029
johannhof wants to merge 1 commit into
nodejs:masterfrom
johannhof:pbkdf2-fail-on-nan

Conversation

Copy link
Copy Markdown

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

Copy link
Copy Markdown
Author

cc @bnoordhuis

johannhof force-pushed the pbkdf2-fail-on-nan branch 2 times, most recently from b9eaa43 to d9d05fc Compare September 23, 2015 16:51

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

/cc @nodejs/collaborators - can I have one more LGTM?

bnoordhuis added confirmed-bug Issues with confirmed bugs. crypto Issues and PRs related to the crypto subsystem. labels Sep 23, 2015
Comment thread test/parallel/test-crypto-pbkdf2.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

s/NaN/negative/

mscdex commented Sep 23, 2015

Copy link
Copy Markdown
Contributor

One minor nit, otherwise LGTM

Comment thread test/parallel/test-crypto-pbkdf2.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Check at least the type of error.

indutny commented Sep 23, 2015

Copy link
Copy Markdown
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

Copy link
Copy Markdown
Author

@indutny @thefourtheye @mscdex @bnoordhuis Updated, thanks for the remarks :)

Copy link
Copy Markdown
Contributor

LGTM

Copy link
Copy Markdown
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>

Copy link
Copy Markdown
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

Labels

confirmed-bug Issues with confirmed bugs. crypto Issues and PRs related to the crypto subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL