-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
crypto Cipher/Decipher validation issues #45189
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Would it make sense to introduce a new error like |
Adds encoding validation to update and final cipher methods. nodejs#45189
Adds encoding validation to update and final cipher methods. nodejs#45189
Adds encoding validation to update and final cipher methods. nodejs#45189
Adds encoding validation to update and final cipher methods. nodejs#45189
I'm afraid the last mentioned "other issue" is also present in Sign , Verify, Hash, Hmac, and the like. I also suspect hard validating may be breaking for a lot of legacy applications. I suggest to deal with the first two in #45990 and leaving the inputEncoding validation to a separate PR and CITGM to decide whether it's worth fixing or not. Also refs: #31766 |
This also affects Decipher methods.
Here's an example:
Gives an internal assertion:
final
has the same issue:Other issue:
Gives no error at all for the wrong input encoding.
@nodejs/crypto
The text was updated successfully, but these errors were encountered: