Skip to content

Jackson model: Meta Binaries is written without its wrapper element, so KDBX 3.1 attachments are lost #98

Description

@astrapi69

Version 2.2.4, KeePassJava2-jackson.

jackson/model/KeePassFile.java:206-207:

@JacksonXmlProperty(localName = "Binaries")
public List<Binary> binaries;

The list has no @JacksonXmlElementWrapper. The Simple model declares the same spot as @ElementList(name = "Binaries", required = false) (simple/model/KeePassFile.java:126-127), which produces the <Binaries> container with <Binary> children the KeePass format uses.

Effect, measured with KeePassXC 2.7.10 (keepassxc-cli): KeePassXC reports skip element "Binaries" on a file written by JacksonDatabase. For KDBX 4 the attachment still arrives, because it is also in the inner header (see the TODO in KdbxStreamFormat.save). For KDBX 3.1 there is no inner header, the XML node is the only carrier, and the attachment was gone after a JacksonDatabase.save in 3.1 format.

Context: astrapi69/mystic-crypt-ui#384.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions