Skip to content

Commit

Permalink
Merge pull request #5566 from nextcloud/bugfix/tolerateMissingPrivateKey
Browse files Browse the repository at this point in the history
in case server has no private key, let e2ee init fail
  • Loading branch information
mgallien authored Apr 7, 2023
2 parents b655fce + a852eda commit ef5325e
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 ef5325e

Please sign in to comment.