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:
@@ -1102,6 +1102,8 @@ _handle_groupchat(xmpp_stanza_t* const stanza)
|
||||
case OMEMO_ERR_DECRYPT_FAILED:
|
||||
message->plain = g_strdup("OMEMO message received but decryption failed.");
|
||||
break;
|
||||
case OMEMO_ERR_KEY_TRANSPORT:
|
||||
break;
|
||||
default:
|
||||
message->plain = g_strdup("OMEMO message received but could not be decrypted.");
|
||||
break;
|
||||
@@ -1283,6 +1285,8 @@ _handle_muc_private_message(xmpp_stanza_t* const stanza)
|
||||
case OMEMO_ERR_DECRYPT_FAILED:
|
||||
message->plain = g_strdup("OMEMO message received but decryption failed.");
|
||||
break;
|
||||
case OMEMO_ERR_KEY_TRANSPORT:
|
||||
break;
|
||||
default:
|
||||
message->plain = g_strdup("OMEMO message received but could not be decrypted.");
|
||||
break;
|
||||
@@ -1471,6 +1475,8 @@ _handle_chat(xmpp_stanza_t* const stanza, gboolean is_mam, gboolean is_carbon, c
|
||||
case OMEMO_ERR_DECRYPT_FAILED:
|
||||
message->plain = g_strdup("OMEMO message received but decryption failed.");
|
||||
break;
|
||||
case OMEMO_ERR_KEY_TRANSPORT:
|
||||
break;
|
||||
default:
|
||||
message->plain = g_strdup("OMEMO message received but could not be decrypted.");
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user