Closed
Conversation
This makes HmacUpdate slightly simpler and introduces a CHECK instead of ignoring invalid input types.
Member
Author
|
cc @nodejs/crypto |
Member
|
@nodejs/security-wg |
maclover7
approved these changes
Aug 5, 2018
Member
Author
lpinca
approved these changes
Aug 5, 2018
ryzokuken
approved these changes
Aug 5, 2018
| r = hmac->HmacUpdate(decoder.out(), decoder.size()); | ||
| } else if (args[0]->IsArrayBufferView()) { | ||
| } else { | ||
| CHECK(args[0]->IsArrayBufferView()); |
Contributor
There was a problem hiding this comment.
Does this work as expected? We weren't exactly crashing at an illegal argument before. It must be fine if it's type-checked in JS-land (in which case, do we even need it?)
Member
Author
There was a problem hiding this comment.
It is being type-checked in JS, but in case someone calls the binding directly or finds a way to avoid JS type-checking, this is here for safety.
cjihrig
approved these changes
Aug 7, 2018
Member
|
Landed in 7e29453 |
trivikr
pushed a commit
that referenced
this pull request
Aug 8, 2018
This makes HmacUpdate slightly simpler and introduces a CHECK instead of ignoring invalid input types. PR-URL: #22132 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos
pushed a commit
that referenced
this pull request
Aug 11, 2018
This makes HmacUpdate slightly simpler and introduces a CHECK instead of ignoring invalid input types. PR-URL: #22132 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This was referenced Aug 16, 2018
firass111
pushed a commit
to firass111/Project_node1
that referenced
this pull request
Apr 16, 2025
This makes HmacUpdate slightly simpler and introduces a CHECK instead of ignoring invalid input types. PR-URL: nodejs/node#22132 Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
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.
This makes
HmacUpdateslightly simpler and introduces aCHECKinstead of ignoring invalid input types. The JS layer shouldn't pass invalid inputs anyway.Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes