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: a2726b6a7 made the <payload> element mandatory in the parser.
Ref: 4d49c2b74 the 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:
Michael Vetter
2026-03-22 17:14:24 +01:00
parent a85a33e397
commit e4bfda2f8a
4 changed files with 26 additions and 14 deletions

View File

@@ -132,6 +132,7 @@ typedef enum {
OMEMO_ERR_DECRYPT_FAILED,
OMEMO_ERR_INVALID_JID,
OMEMO_ERR_MUC_SENDER_NOT_FOUND,
OMEMO_ERR_KEY_TRANSPORT,
OMEMO_ERR_OTHER
} omemo_error_t;