bpellin / keepassdroid

KeePass implementation for android
http://www.keepassdroid.com
Other
1.38k stars 346 forks source link

Keepassdroid corrupts existing database on save #490

Open lucebac opened 2 years ago

lucebac commented 2 years ago

Hey there, unfortunate situation happened on my phone tonight. I added a password to an existing KDBX file and after a save the database was corrupt and could not be opened anymore - even with Keepassdroid.

I was able to recreate the issue using the following steps (I also attached the files I created):

I diffed the broken file with the original one and it seems that Keepassdroid set the file version down to 3.1 from the original 4.0 (broken database on the left, original on the right): signatures

By skimming through the code I believe I narrowed down the issue to be happening in getMinKdbxVersion where the logic falls back to returning version 3.1.

Please find attached my test databases. The password I chose was test. databases.zip

If you need more details or can't reproduce the issue, please let me know and I'll happily provide more information. Thanks for your great work!

Scaninky commented 2 years ago

I am having the same problem.... Galaxy s21 latest android. My file stored on google drive. Will not open...... says Corrupted but when i go to my laptop it does open from there.