You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
When calling getLisk32AddressFromPublicKey it accepts publicKey as an argument but by mistake users can pass any length buffer as their is no check and it can result in unintended output of the function or incorrect address which can be misleading.
Add buffer length check to atleast avoid incorrect length buffers which can alert the user if they are passing incorrect buffer. Since this function accepts publicKey we can have a length check === 32 for buffer and throw error if not.
Steps to reproduce
Call cryptography.address.getLisk32AddressFromPublicKey(Buffer.alloc(1)) it will result in lsk92dzwnnge9h4ynmm3tt5efz6myj4zn4gt2yh4z
Which version(s) does this affect? (Environment, OS, etc...)
v6.0.0-rc.3
The text was updated successfully, but these errors were encountered:
Description
When calling
getLisk32AddressFromPublicKey
it accepts publicKey as an argument but by mistake users can pass any length buffer as their is no check and it can result in unintended output of the function or incorrect address which can be misleading.Add buffer length check to atleast avoid incorrect length buffers which can alert the user if they are passing incorrect buffer. Since this function accepts publicKey we can have a length check
=== 32
for buffer and throw error if not.Steps to reproduce
cryptography.address.getLisk32AddressFromPublicKey(Buffer.alloc(1))
it will result inlsk92dzwnnge9h4ynmm3tt5efz6myj4zn4gt2yh4z
Which version(s) does this affect? (Environment, OS, etc...)
v6.0.0-rc.3
The text was updated successfully, but these errors were encountered: