Skip to content
Snippets Groups Projects
Verified Commit f4e670d8 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Fix SSSS unlock without a password set

fixes #657
parent d55f7ea1
No related branches found
No related tags found
No related merge requests found
Pipeline #1476 passed
......@@ -1028,8 +1028,15 @@ ChatPage::decryptDownloadedSecrets(mtx::secret_storage::AesHmacSha2KeyDescriptio
auto decryptionKey = mtx::crypto::key_from_recoverykey(text.toStdString(), keyDesc);
if (!decryptionKey)
decryptionKey = mtx::crypto::key_from_passphrase(text.toStdString(), keyDesc);
if (!decryptionKey && keyDesc.passphrase) {
try {
decryptionKey =
mtx::crypto::key_from_passphrase(text.toStdString(), keyDesc);
} catch (std::exception &e) {
nhlog::crypto()->error("Failed to derive secret key from passphrase: {}",
e.what());
}
}
if (!decryptionKey) {
QMessageBox::information(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment