Skip to content

Commit

Permalink
in case server has no private key, let e2ee init fail
Browse files Browse the repository at this point in the history
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
  • Loading branch information
mgallien authored and backportbot-nextcloud[bot] committed Apr 7, 2023
1 parent 79163b0 commit 4d21d95
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libsync/clientsideencryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4d21d95

Please sign in to comment.