Kunzisoft / KeePassDX

Lightweight vault and password manager for Android, KeePassDX allows editing encrypted data in a single file in KeePass format and fill in the forms in a secure way.
https://www.keepassdx.com/
GNU General Public License v3.0
4.55k stars 269 forks source link

XmlPullException #1743

Closed bigtonylewis closed 4 months ago

bigtonylewis commented 8 months ago

Describe the bug

KeepassDX cannot open my Keepass 2 database, created on KeepassXC on a Linux desktop. I have recreated the error with a test database that recreates the fault consistently.

Note that on a plain empty password database, the error does not occur. It does on my proper database and it does on this test database.

The error is: Could not load your database. org.xmlpull.v1.XmlPullParserException: Wrong tvent type (Position: TEXT EgM83Q4AAAA=@38:39 in java.io.InputStreamReader@bff81) though the last suffix changes.

If I export the database to XML, there is indeed the string EgM83Q4AAAA= at line 38, character 39. Excerpt:

        <CustomData>
            <Item>
                <Key>KPXC_DECRYPTION_TIME_PREFERENCE</Key>
                <Value>1000</Value>
                <LastModificationTime>EgM83Q4AAAA=</LastModificationTime>
            </Item>
            <Item>
                <Key>_LAST_MODIFIED</Key>
                <Value>Fri Jan 19 05:43:46 2024 GMT</Value>
            </Item>
        </CustomData>

Possible contributing factors:

To Reproduce

Steps to reproduce the behavior:

  1. Open the database FromScratch.kdbx
  2. Enter the password qpqpqpqpqpqpqpqpqpqpqpqpqpqpqp (that's 15 lots of q and p)

Expected behavior

The database should open.

KeePass Database

KeePassDX:

Android:

bigtonylewis commented 8 months ago

FromScratch.zip

bigtonylewis commented 8 months ago

Further looking into value of the element:

base64 -d | od -t x1c
EgM83Q4AAAA=
0000000  12  03  3c  dd  0e  00  00  00
        022 003   < 335 016  \0  \0  \0
0000010

No combination of those hex digits resembles the hex value of the current date, which is 0x65AA13A4

J-Jamet commented 4 months ago

I've just tested opening your database with KeePassDX 4.0.6 and I'm not having any problems. KeePassDX version 2.8.3 is extremely old, I've had to fix the problem since then, please update the application.

bigtonylewis commented 4 months ago

Thanks, I "upgraded" and it works, but upgrading meant installing the new and then uninstalling the old. It was treating it as two separate apps.

Anyway, thank you