diff options
author | Tobias Fella <fella@posteo.de> | 2022-03-09 20:23:23 +0100 |
---|---|---|
committer | Tobias Fella <fella@posteo.de> | 2022-03-09 20:23:23 +0100 |
commit | b8c22ff0663350a019ae918771fac4b6447d2b09 (patch) | |
tree | 5a35360cbd904248a5061e10ffbcea3b504146ab | |
parent | cbc42d892f7fcc0ef269229c5750266c544729b2 (diff) | |
download | libquotient-b8c22ff0663350a019ae918771fac4b6447d2b09.tar.gz libquotient-b8c22ff0663350a019ae918771fac4b6447d2b09.zip |
Check for empty ed25519 key.
-rw-r--r-- | lib/connection.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp index 506a2bc0..cb04ffe8 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -322,6 +322,11 @@ public: << "in Olm plaintext"; return {}; } + //TODO make this do the check mentioned in the E2EE Implementation guide instead + if (decryptedEvent->fullJson()["keys"]["ed25519"].toString().isEmpty()) { + qCDebug(E2EE) << "Event does not contain an ed25519 key"; + return {}; + } // TODO: keys to constants const auto decryptedEventObject = decryptedEvent->fullJson(); |