Commit 65cea420 authored by Philipp Hörist's avatar Philipp Hörist

[omemo] Don't silently drop message on decryption error

Fixes #496
parent 5e4ea58e
...@@ -148,7 +148,12 @@ class OmemoState(DeviceManager): ...@@ -148,7 +148,12 @@ class OmemoState(DeviceManager):
self._log.debug("Decrypted Key Exchange Message") self._log.debug("Decrypted Key Exchange Message")
raise KeyExchangeMessage raise KeyExchangeMessage
result = aes_decrypt(key, omemo_message.iv, omemo_message.payload) try:
result = aes_decrypt(key, omemo_message.iv, omemo_message.payload)
except Exception as error:
raise DecryptionFailed
self._log.debug("Decrypted Message => %s", result) self._log.debug("Decrypted Message => %s", result)
return result, fingerprint, trust return result, fingerprint, trust
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment