Closed alanshaw closed 2 years ago
Shouldn't there be some more validation of the ID passed to PeerId?
PeerId
Currently it's checked to ensure it's a buffer...shouldn't it be checked to ensure it's a valid CID?
Also applies to the commonly used factory functions like createFromB58String, which will ensure the string is base 58 encoded but nothing else.
createFromB58String
Hi! Is this still actual? I see that factory functions have validations as of now.
cc @vasco-santos
That's correct, thanks
Shouldn't there be some more validation of the ID passed to
PeerId
?Currently it's checked to ensure it's a buffer...shouldn't it be checked to ensure it's a valid CID?
Also applies to the commonly used factory functions like
createFromB58String
, which will ensure the string is base 58 encoded but nothing else.