mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-21 04:36:20 +00:00
fix: Incorrect omemo decryption error for Key Transport Messages
Correctly handle OMEMO stanzas that contain a <header> but no <payload>. These "Key Transport Messages" (heartbeats) are used by some clients for session maintenance and establishing trust. Ref:a2726b6a7made the <payload> element mandatory in the parser. Ref:4d49c2b74the bug became user-visible. Fixes: https://github.com/profanity-im/profanity/issues/2129 Signed-off-by: Michael Vetter <jubalh@iodoru.org>
This commit is contained in:
@@ -1145,6 +1145,11 @@ omemo_on_message_recv(const char* const from_jid, uint32_t sid,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (payload == NULL) {
|
||||
signal_buffer_free(plaintext_key);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t plaintext_len = payload_len;
|
||||
plaintext = malloc(plaintext_len + 1);
|
||||
res = aes128gcm_decrypt(plaintext, &plaintext_len, payload, payload_len, iv,
|
||||
|
||||
Reference in New Issue
Block a user