Merge pull request #5566 from nextcloud/bugfix/tolerateMissingPrivateKey

in case server has no private key, let e2ee init fail
This commit is contained in:
Matthieu Gallien 2023-04-07 17:38:46 +02:00 committed by GitHub
commit ef5325e6ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();