Keepassdx: 2.5.0.0beta25 is damaging kdbx (V2) files, Length of Base64 encoded input string is not a multiple of 4

Created on 21 Dec 2019  路  12Comments  路  Source: Kunzisoft/KeePassDX

Thanks for the great app. Unfortunately, 2.5.0.0beta25 is writing the db file incorrectly so other programs cannot open it. Also older versions of KPDX cannot open the files anymore.

To reproduce:

install 2.5.0.0beta25 from f-droid
open database
make a new entry
save database

Now try to open the database, two options:

Use KeePassXC to open the file:

sync database to desktop
open database in KPXC
Expected behavior: file opens
Resulted behavior: Open fails with: Unable to decompress binary

Open in older KPDX 2.5.0.0beta23:

open database
Expected behavior: file opens
Resulted behavior: Could not load your database. Length of Base64 encoded input string is not a multiple of 4

bug completed developments

Most helpful comment

Yes, you will be able to open databases with this problem and saving will resolve the formatting of binary data.
I don't know how long it will take to create the new version. I 'm working on my free time and I don't have much right now. I plan to solve the problems present in the project: https://github.com/Kunzisoft/KeePassDX/projects/8

All 12 comments

Possibly a duplicate of #406

All the problems related to binaries are linked, I'm fixing the problem but I have to make big changes. Once I have finished, the application will be able to correctly manage the attachments.

I just tested and the problem comes from commit #cc5b96f539a180b6b49431ec3143e92c9ab4ec20. I will see why exactly

I solved the problem in the git _feature/Stream_Binaries_ branch. The problem came from the improvement of code, there was a problem between the passage of compressed and uncompressed binaries.

Thank you very much for looking into it.

Great, thanks for the quick fix! I run into the same issue today. 馃槬 I assume the next version will be able to open the corrupted file and store it again in the correct format, right? Can you already estimate when the next beta will be available?

Yes, you will be able to open databases with this problem and saving will resolve the formatting of binary data.
I don't know how long it will take to create the new version. I 'm working on my free time and I don't have much right now. I plan to solve the problems present in the project: https://github.com/Kunzisoft/KeePassDX/projects/8

Since the problem is compressing the database, any affected user can for the time being workaround this issue:

  1. Open the database with KeePass DX (phone)
  2. Tap on "Settings/Parameters" in the three vertical dots menu on the top right corner of KeePassDX
  3. Tap on "Database parameters", then on "Data compression" and choose "None" (instead of "GZip").

Wait until the database is saved and you will be able to open that database with KeePassXC and other programs.

In my case, the compressed database was 25kB while the uncompressed database was 330kB, so if you are syncing your database over your data plan consider that this solution will require extra data usage.

I would suggest to use back GZip compression once this issue is solved and the solution is released.

@zeehio thanks for the workarround, you save my day

The problem is normally fixed with the new version, can you confirm it?

The problem is normally fixed with the new version, can you confirm it?

2.5.0.0beta26 appears to have fixed the issue, but F-Droid did not receive the Feb 7 update and is still at version 2.5.0.0beta25.

Yes, I don't know why. If you want, you can open an issue in the gitlab repo of F-Droid data.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fancsali picture fancsali  路  3Comments

Wilker-a picture Wilker-a  路  6Comments

thgoebel picture thgoebel  路  3Comments

kermit-frog picture kermit-frog  路  4Comments

alexanderadam picture alexanderadam  路  4Comments