diff --git a/src/lib/waku_message/version_1.ts b/src/lib/waku_message/version_1.ts index 0926fb1d89..47e7d16b07 100644 --- a/src/lib/waku_message/version_1.ts +++ b/src/lib/waku_message/version_1.ts @@ -234,9 +234,7 @@ function validateDataIntegrity( return false; } - return !( - expectedSize > 3 && Buffer.from(value).equals(Buffer.alloc(value.length)) - ); + return expectedSize <= 3 || value.findIndex((i) => i !== 0) !== -1; } function getSignature(message: Uint8Array): Uint8Array {