Don't upgrade to KDBX 4 when CustomData are present only in meta data section, resolves #1565

This commit is contained in:
Janek Bevendorff
2018-02-28 23:02:45 +01:00
parent 2e8846ef8d
commit 0d4aff55bc
4 changed files with 36 additions and 17 deletions

View File

@@ -149,8 +149,10 @@ void TestKdbx4::testFormat400Upgrade()
sourceDb->changeKdf(KeePass2::uuidToKdf(kdfUuid));
sourceDb->setCipher(cipherUuid);
// CustomData in meta should not cause any version change
sourceDb->metadata()->customData()->set("CustomPublicData", "Hey look, I turned myself into a pickle!");
if (addCustomData) {
sourceDb->metadata()->customData()->set("CustomPublicData", "Hey look, I turned myself into a pickle!");
// this, however, should
sourceDb->rootGroup()->customData()->set("CustomGroupData", "I just killed my family! I don't care who they were!");
}