crypto: allow undefined for saltLength and padding#26921
Closed
tniessen wants to merge 1 commit intonodejs:masterfrom
Closed
crypto: allow undefined for saltLength and padding#26921tniessen wants to merge 1 commit intonodejs:masterfrom
tniessen wants to merge 1 commit intonodejs:masterfrom
Conversation
jasnell
approved these changes
Mar 26, 2019
Collaborator
bnoordhuis
approved these changes
Mar 27, 2019
Member
bnoordhuis
left a comment
There was a problem hiding this comment.
I agree. For reference, the hasOwnProperty() check was introduced in #11705.
Member
|
I agree. The only reason i can come up with is that providing undefined as the property's value is indicative of users thinking they pass the constant value while in fact they're not, so before this PR their error would be caught right there, now it won't and the defaults will be applied. |
This comment has been minimized.
This comment has been minimized.
Member
Author
|
Thanks for reviewing, landed in c35acc0. |
tniessen
added a commit
that referenced
this pull request
Mar 28, 2019
PR-URL: #26921 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
migounette
pushed a commit
to migounette/node-js
that referenced
this pull request
Mar 28, 2019
PR-URL: nodejs#26921 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
targos
pushed a commit
that referenced
this pull request
Mar 28, 2019
PR-URL: #26921 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
BethGriggs
pushed a commit
that referenced
this pull request
Apr 5, 2019
PR-URL: #26921 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
BethGriggs
pushed a commit
that referenced
this pull request
Apr 8, 2019
PR-URL: #26921 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Merged
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.
Using
options.hasOwnPropertyis not how we usually validate options. Passing{ saltLength }wheresaltLength === undefinedshould be equivalent to not passing asaltLengthoption in my opinion. Feel free to disagree!Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes