[omemo] Fail with log output on invalid stanza

This commit is contained in:
Philipp Hörist
2018-04-21 14:06:05 +02:00
parent 70a01c0d0f
commit ab38ee7b7c

View File

@@ -227,6 +227,10 @@ class OMEMOConnection:
from_jid = app.get_jid_without_resource(from_jid)
msg_dict = unpack_encrypted(omemo_encrypted_tag)
if msg_dict is None:
log.error('Invalid omemo message received:\n%s', msg.msg_)
msg.encrypted = 'drop'
return
msg_dict['sender_jid'] = from_jid