Skip to content

SimpleDatabase cannot load a KDBX file written by JacksonDatabase: DefaultUserName is required #101

Description

@astrapi69

Version 2.2.4.

Steps, measured:

  1. JacksonDatabase.load a KDBX file (reproduced with a KDBX 3.1 file and with a KDBX 4 file written by KeePassXC 2.7.10) and copy it into a new JacksonDatabase().
  2. save it with JacksonDatabase.
  3. SimpleDatabase.load the saved file.

Result:

org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Element(name="DefaultUserName", type=void.class, data=false, required=true) on field 'defaultUserName' protected java.lang.String org.linguafranca.pwdb.kdbx.simple.model.KeePassFile$Meta.defaultUserName

The Jackson writer leaves an empty DefaultUserName out of Meta; the Simple model declares it required = true (simple/model/KeePassFile.java:81). KeePassXC 2.7.10 reads the Jackson-written file.

required = false on the Simple side would let it read files that omit the element, as KeePassXC does.

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

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