Closed J-Jamet closed 3 years ago
demoErrorKDBX4.zip
password : secret
In this example, the entry My Computer / SSH Key
contains two attachments: _"idrsa" and _"idrsa.pub".
In KeePass2, _"idrsa" has the contents of _"idrsa.pub" and _"idrsa.pub" is an empty file.
In KeePassXC, both attachments are read correctly.
In both cases, the history is correct.
I did a lot of testing, checked the data formatting but still don't understand the problem. If anyone has any advice on empty attachments in KeePass2, this might help.
~I don't know what makes this but I want to notice, the otp fields or have the otp url or is empty. Trying to use this fields in DX clears the otp url.~
(from Dominik) In your demoErrorKDBX4.kdbx file, the third and the fourth binary content in the inner header are identical. As KeePass assumes that a deduplication has been performed, the fourth binary content is ignored and the indices are interpreted differently from this point on. I guess it's more likely that an application doesn't perform a deduplication than accidently storing a binary content multiple times in the inner header. Therefore, I've now added support for loading duplicate binary contents for the next KeePass release. With this, your demoErrorKDBX4.kdbx file can now be loaded with KeePass.
It is therefore necessary to remove file duplication in binaries.
This problem is solved, great!
This problem is very weird, because it seems that the attachments are attached correctly in the header but they are not correctly decrypted by KeePass2 but clearly visible by KeePassXC. (Note: Also correctly visible in KeePassDX)
Only with KBDX 4.0 databases, KDBX 3.1 uses attachments in the XML and not in the header.