From 9f7a65b04c246de4c27b205ece778ede1ad7df7e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Fri, 24 Jun 2022 09:18:09 +0200 Subject: Fix copy-pasta in signed one-time key JSON dumper --- lib/connection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/connection.cpp') diff --git a/lib/connection.cpp b/lib/connection.cpp index 2319a38a..13a35684 100644 --- a/lib/connection.cpp +++ b/lib/connection.cpp @@ -2306,10 +2306,11 @@ bool Connection::Private::createOlmSession(const QString& targetUserId, signedOneTimeKey ->signatures[targetUserId]["ed25519:"_ls % targetDeviceId] .toLatin1(); + const auto payloadObject = + toJson(SignedOneTimeKey { signedOneTimeKey->key, {} }); if (!verifier.ed25519Verify( edKeyForUserDevice(targetUserId, targetDeviceId).toLatin1(), - QJsonDocument(toJson(SignedOneTimeKey { signedOneTimeKey->key, {} })) - .toJson(QJsonDocument::Compact), + QJsonDocument(payloadObject).toJson(QJsonDocument::Compact), signature)) { qWarning(E2EE) << "Failed to verify one-time-key signature for" << targetUserId << targetDeviceId << ". Skipping this device."; -- cgit v1.2.3