From 62fa03959af69336e9b706645a6e3b708dd5e4c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 13 Jul 2021 23:07:06 +0200 Subject: [PATCH] Ensure bundles are republished on decrypt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This would likely do that we had a fixed set of prekeys because we wouldn't republish after one was used. This shouldn't have any security implications. Just so that we wouldn't have been able to initiate new sessions after all published prekeys were used up, as we don't have the private keys anymore. They are deleted when used (as should be) by the backend OMEMO library. Signed-off-by: Maxime “pep” Buquet --- slixmpp_omemo/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slixmpp_omemo/__init__.py b/slixmpp_omemo/__init__.py index 47c30c5..6c803d0 100644 --- a/slixmpp_omemo/__init__.py +++ b/slixmpp_omemo/__init__.py @@ -608,7 +608,6 @@ class XEP_0384(BasePlugin): payload, allow_untrusted=allow_untrusted, ) - return body except (omemo.exceptions.NoSessionException,): # This might happen when the sender is sending using a session # that we don't know about (deleted session storage, etc.). In @@ -624,6 +623,8 @@ class XEP_0384(BasePlugin): finally: asyncio.ensure_future(self._publish_bundle()) + return body + async def encrypt_message( self, plaintext: str,