From a852eda937e9a96267b049e8e487bf3a1fcf8566 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 4 Apr 2023 09:06:24 +0200 Subject: [PATCH] in case server has no private key, let e2ee init fail Signed-off-by: Matthieu Gallien --- src/libsync/clientsideencryption.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsync/clientsideencryption.cpp b/src/libsync/clientsideencryption.cpp index fe50a3c1c7cee..d1716841a0482 100644 --- a/src/libsync/clientsideencryption.cpp +++ b/src/libsync/clientsideencryption.cpp @@ -1434,8 +1434,12 @@ void ClientSideEncryption::getPrivateKeyFromServer(const AccountPtr &account) decryptPrivateKey(account, key.toLocal8Bit()); } else if (retCode == 404) { qCInfo(lcCse()) << "No private key on the server: setup is incomplete."; + emit initializationFinished(); + return; } else { qCInfo(lcCse()) << "Error while requesting public key: " << retCode; + emit initializationFinished(); + return; } }); job->start();