Menu

V1 XML import failure

Paul
2017-01-20
2017-02-09
  • Paul

    Paul - 2017-01-20

    I was testing a V1 import and stumbled upon a weird issue.
    I exported a V1 database as V1 XML and then attempted to import it into a V2 database. The import failed on a password with non-printable characters. I'll attach the export for testing (can't do it in an initial post).

    Exported from KeePass V1.31
    Imported to KeePass V2.35

    cheers, Paul

     
  • Paul

    Paul - 2017-01-20

    V1 XML file.

     
  • Dominik Reichl

    Dominik Reichl - 2017-01-20

    The behavior of .NET's XML reader is correct here. In your file, line 8, position 12, there's a U+0001 character. According to the XML 1.0 specification, this is not a valid character; see
    https://www.w3.org/TR/2006/REC-xml-20060816/#charsets

    How did you get this character into a KeePass 1.x KDB file? The password generator doesn't generate U+0001 characters and I'm not aware of any way to type this character.

    Best regards,
    Dominik

     
  • T. Bug Reporter

    T. Bug Reporter - 2017-01-20

    I'll attach the export for testing (can't do it in an initial post).

    FYI, while SF doesn't provide an option to add attachments with an initial post*, it will provide such an option if you later edit that initial post.

    * BTW, "Initial post" here does not include "tickets", which can't be edited at all (and which annoys me greatly).

     
  • Paul

    Paul - 2017-01-21

    I can type it in Notepad++ by holding down Alt and typing zero, zero, one on the numeric keypad. It won't go into KeePass using that method, so I assume I created it in Notepad++ and pasted into KeePass.

    cheers, Paul

     
  • Dominik Reichl

    Dominik Reichl - 2017-02-08

    I've now added a filter in KeePass 1.x; invalid characters (like U+0001 and other control characters) now aren't exported to XML files anymore.

    Here's the latest 1.x development snapshot for testing:
    http://keepass.info/filepool/KeePass_170208b.zip

    Thanks and best regards,
    Dominik

     
  • Paul

    Paul - 2017-02-09

    That fixes the XML export.
    It is exported correctly in CSV - the unusual characters are still included.
    Not tried an import.

    cheers, Paul

     
  • Dominik Reichl

    Dominik Reichl - 2017-02-14

    Well, it's debatable whether it makes sense to store control characters in CSV files, but I don't see problems from a file format point of view. Such CSV files can be imported both into KeePass 1.x and 2.x, and 2.x will fix the data (i.e. remove control characters) when saving/loading the database.

    Best regards,
    Dominik

     
  • Paul

    Paul - 2017-02-14

    It was really an academic discussion on the ability of KeePass to handle the characters. I can't see any real world use for the ability.

    cheers, Paul

     

Log in to post a comment.

Auth0 Logo