Version 2.2.4, KeePassJava2-kdbx.
KdbxStreamFormat.save (around lines 81-90) copies every binary into the inner header for version 4 and then says:
// TODO the binaries should now be removed so they don't get serialized in XML
They are not removed, so every KDBX 4 file with an attachment carries the binary pool twice. KeePassXC notices on every read. Measured with keepassxc-cli 2.7.10 on a file written by each serializer:
SimpleDatabase.save: KdbxXmlReader::parseBinaries: overwriting binary item "0"
JacksonDatabase.save: KdbxXmlReader::skipCurrentElement: skip element "Binaries"
The attachment itself reads back correctly in both cases (from the inner header). The warning and the duplicated bytes remain.
Would removing the Binaries from the serializable database after they are moved into the header, for version 4, be the fix you intended by the TODO?
Context: astrapi69/mystic-crypt-ui#379.
Version 2.2.4,
KeePassJava2-kdbx.KdbxStreamFormat.save(around lines 81-90) copies every binary into the inner header for version 4 and then says:// TODO the binaries should now be removed so they don't get serialized in XMLThey are not removed, so every KDBX 4 file with an attachment carries the binary pool twice. KeePassXC notices on every read. Measured with
keepassxc-cli2.7.10 on a file written by each serializer:SimpleDatabase.save:KdbxXmlReader::parseBinaries: overwriting binary item "0"JacksonDatabase.save:KdbxXmlReader::skipCurrentElement: skip element "Binaries"The attachment itself reads back correctly in both cases (from the inner header). The warning and the duplicated bytes remain.
Would removing the
Binariesfrom the serializable database after they are moved into the header, for version 4, be the fix you intended by the TODO?Context: astrapi69/mystic-crypt-ui#379.