From bea433e377ef2901a05fe9da262c03af011e04a5 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sun, 25 Sep 2022 11:35:12 +0200 Subject: [PATCH] fix: React to all decryption errors with ratchet restoration --- lib/src/omemo/sessionmanager.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/omemo/sessionmanager.dart b/lib/src/omemo/sessionmanager.dart index ce10a7d..6ba00a3 100644 --- a/lib/src/omemo/sessionmanager.dart +++ b/lib/src/omemo/sessionmanager.dart @@ -381,7 +381,7 @@ class OmemoSessionManager { } else { keyAndHmac = await ratchet.ratchetDecrypt(message, decodedRawKey); } - } on InvalidMessageHMACException { + } catch (_) { await _restoreRatchet(ratchetKey, oldRatchet); rethrow; }