onGroupReceived: Only process a group if it has a 16-byte id
This commit is contained in:
parent
fd612234bb
commit
82bf517a69
1 changed files with 9 additions and 0 deletions
|
@ -2116,6 +2116,15 @@
|
|||
const details = ev.groupDetails;
|
||||
const { id } = details;
|
||||
|
||||
const idBuffer = window.Signal.Crypto.fromEncodedBinaryToArrayBuffer(id);
|
||||
const idBytes = idBuffer.byteLength;
|
||||
if (idBytes !== 16) {
|
||||
window.log.error(
|
||||
`onGroupReceived: Id was ${idBytes} bytes, expected 16 bytes. Dropping group.`
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const conversation = await ConversationController.getOrCreateAndWait(
|
||||
id,
|
||||
'group'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue