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.32k stars 261 forks source link

Database cannot be opened when using OneDrive #898

Closed rafipanoyan closed 3 years ago

rafipanoyan commented 3 years ago

Describe the bug The database is corrupted as soon as I edit it.

To Reproduce Steps to reproduce the behavior:

  1. Create a new database with KeePass, set the key derivation iteration to 2.000.000
  2. Upload this file to Onedrive (only tested on onedrive)
  3. Open the file with KeePassDX from the Onedrive Android app
  4. Remove en entry and save
  5. Try to open the file again in KeePassDX
  6. An IOException is thrown in a red snackbar; BadPaddingException.

I have another file throwing a "Hashes didn't match" IOException when I edit it.

Expected behavior The database should be opening as normal

KeePass Database

KeePassDX (please complete the following information):

Android (please complete the following information):

Additional context When the file become corrupted for KeePassDX, the Windows version of KeePass can't open it neither

J-Jamet commented 3 years ago

I just tested locally, without using OneDrive, and have no problem. Your concern must come from OneDrive which does not save the entire given file in the stream of its content provider. Can you try without OneDrive?

rafipanoyan commented 3 years ago

Ok you seem to be right, when I download the file locally I don't have any issue editing and opening both files. I should have tested that before opening the issue...

Thanks for your quick reply !