From bd058ebf73a31f1a83d43522074b69432a0d2a94 Mon Sep 17 00:00:00 2001 From: "Schimon Jehudah, Adv." Date: Sun, 7 Jul 2024 11:49:52 +0300 Subject: [PATCH] Always allow untrusted keys. --- slixfeed/version.py | 4 ++-- slixfeed/xmpp/chat.py | 1 + slixfeed/xmpp/encryption.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/slixfeed/version.py b/slixfeed/version.py index 6f60d2d..a3a4016 100644 --- a/slixfeed/version.py +++ b/slixfeed/version.py @@ -1,2 +1,2 @@ -__version__ = '0.1.89' -__version_info__ = (0, 1, 89) +__version__ = '0.1.90' +__version_info__ = (0, 1, 90) diff --git a/slixfeed/xmpp/chat.py b/slixfeed/xmpp/chat.py index 3c6bd4d..671144f 100644 --- a/slixfeed/xmpp/chat.py +++ b/slixfeed/xmpp/chat.py @@ -151,6 +151,7 @@ class XmppChat: # await compose.message(self, jid_bare, message) if self['xep_0384'].is_encrypted(message): + allow_untrusted=True # Temporary fix. This should be handled by "retry"" command, omemo_decrypted, retry = await XmppOmemo.decrypt( self, message, allow_untrusted) if retry: diff --git a/slixfeed/xmpp/encryption.py b/slixfeed/xmpp/encryption.py index 99b2627..d6362dd 100644 --- a/slixfeed/xmpp/encryption.py +++ b/slixfeed/xmpp/encryption.py @@ -59,7 +59,8 @@ class XmppOmemo: response = message_body.decode('utf8') omemo_decrypted = True else: - response = retry = omemo_decrypted = None + omemo_decrypted = response = None + retry = None except (MissingOwnKey,) as exn: # The message is missing our own key, it was not encrypted for # us, and we can't decrypt it.