mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-28 08:49:42 -05:00
Do not assert KDF UUID and improve error message
This commit is contained in:
parent
b04c8c2b6e
commit
6df54cfe8d
@ -203,7 +203,7 @@ bool Kdbx4Reader::readHeaderField(StoreDataStream& device)
|
|||||||
QVariantMap kdfParams = readVariantMap(&bufIoDevice);
|
QVariantMap kdfParams = readVariantMap(&bufIoDevice);
|
||||||
QSharedPointer<Kdf> kdf = KeePass2::kdfFromParameters(kdfParams);
|
QSharedPointer<Kdf> kdf = KeePass2::kdfFromParameters(kdfParams);
|
||||||
if (!kdf) {
|
if (!kdf) {
|
||||||
raiseError(tr("Invalid KDF parameters"));
|
raiseError(tr("Unsupported key derivation function (KDF) or invalid parameters"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_db->setKdf(kdf);
|
m_db->setKdf(kdf);
|
||||||
|
@ -111,7 +111,6 @@ QSharedPointer<Kdf> KeePass2::uuidToKdf(const Uuid& uuid)
|
|||||||
return QSharedPointer<Argon2Kdf>::create();
|
return QSharedPointer<Argon2Kdf>::create();
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_ASSERT_X(false, "uuidToKdf", "Invalid UUID");
|
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user