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
There are a few places where we decode buffers in the protobuf message into a hex string, e.g. docId. These could be an empty buffer, which would be invalid.
Anywhere we are decoding a Protobuf type bytes (e.g. that decodes to Buffer), we should assert buf.length > 0. I don't think we should make any other assertions about these fields, to support the most forwards compatibility (e.g. they might be 32 bytes now, but we might change that in the future), so the only thing to check is zero-length.
There are a few places where we decode buffers in the protobuf message into a hex string, e.g.
docId
. These could be an empty buffer, which would be invalid.Anywhere we are decoding a Protobuf type
bytes
(e.g. that decodes toBuffer
), we should assertbuf.length > 0
. I don't think we should make any other assertions about these fields, to support the most forwards compatibility (e.g. they might be 32 bytes now, but we might change that in the future), so the only thing to check is zero-length.Related: #115
coreDiscoveryKey
could be a Buffer of any length. We should check it is length 32.The text was updated successfully, but these errors were encountered: