originallgb / keepassdroid

Automatically exported from code.google.com/p/keepassdroid
0 stars 0 forks source link

Changes between 1.9.6 and 1.9.8 broken compatibility with KeePassX #295

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
After upgrading KeePassDroid to 1.9.8 (from market) editing a *.kdb file on the 
phone results in a file which is incorrectly read by KeePassX 0.4.3 on Linux.

I attached some example files:
test1_1.9.6.kdb (password "12345") - edited with KeePassDroid 1.9.6;
test1_1.9.6.xml - dump of test1_1.9.6.kdb made by KeePassX 0.4.3 (here 
everything is correct);
test1.kdb (password "12345") - edited with KeePassDroid 1.9.8 (changed password 
for "new" from "qwe" to "qwer");
test1.xml - dump of test1.kdb made by KeePassX 0.4.3 (here some fields which 
should be empty contain either data from another record, or even garbage).

Apparently this is caused by recent changes to skip fields with empty values 
when saving the database; writing explicit empty strings in this case may give 
better compatibility.

Original issue reported on code.google.com by sigp...@gmail.com on 4 Feb 2012 at 6:24

Attachments:

GoogleCodeExporter commented 8 years ago
I believe that I'm seeing the same thing when I edit an entry in KeePass Droid 
then load the same DB into KeePassX (0.4.3), suddenly all of the empty fields 
contain data from the new entry (or possibly from another entry).  This makes 
KeepPass Droid unusable to me.  It is corrupting the data!
Is there a way to revert back to 1.9.6?

Original comment by jeffjohn...@gmail.com on 7 Feb 2012 at 7:36

GoogleCodeExporter commented 8 years ago
Older .apk versions are available in the download area:
http://code.google.com/p/keepassdroid/downloads/list?can=1

You will also need to find older versions of your .kdb databases which were not 
modified by 1.9.8 (and possibly 1.9.7) - version 1.9.6 will read databases with 
skipped fields, but will crash when you attempt to modify the data.

Original comment by sigp...@gmail.com on 7 Feb 2012 at 7:52

GoogleCodeExporter commented 8 years ago
I have the same problem. Keepass Portable 
(http://downloads.sourceforge.net/keepass/KeePass-1.21.zip (in Wine)) also 
shows the same symptoms. Keepass 2.x can read .kdb only in Windows.

After editing an entry (of a .kdb saved in KeepassDroid 1.9.8) in KeepassDroid 
1.9.5, I got this crash:

02-08 18:37:51.137 W/dalvikvm(29259): threadid=9: thread exiting with uncaught 
exception (group=0x4001d5a0)
02-08 18:37:51.147 E/AndroidRuntime(29259): FATAL EXCEPTION: Thread-19
02-08 18:37:51.147 E/AndroidRuntime(29259): java.lang.NullPointerException
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
com.keepassdroid.database.save.PwEntryOutputV3.output(PwEntryOutputV3.java:107)
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
com.keepassdroid.database.save.PwDbV3Output.outputPlanGroupAndEntries(PwDbV3Outp
ut.java:206)
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
com.keepassdroid.database.save.PwDbV3Output.outputHeader(PwDbV3Output.java:166)
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
com.keepassdroid.database.save.PwDbV3Output.output(PwDbV3Output.java:82)
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
com.keepassdroid.Database.SaveData(Database.java:145)
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
com.keepassdroid.Database.SaveData(Database.java:135)
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
com.keepassdroid.database.edit.SaveDB.run(SaveDB.java:50)
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
com.keepassdroid.database.edit.UpdateEntry.run(UpdateEntry.java:52)
02-08 18:37:51.147 E/AndroidRuntime(29259):     at 
java.lang.Thread.run(Thread.java:1027)
02-08 18:37:51.157 W/ActivityManager( 3262):   Force finishing activity 
com.android.keepass/com.keepassdroid.EntryEditActivity

Original comment by mmau...@googlemail.com on 8 Feb 2012 at 5:56

GoogleCodeExporter commented 8 years ago
I am experiencing the same problem: Modifying a database with KeePassDroid 
v1.9.8, then opening with KeePassX 0.4.3 on a Debian machine results in 
previously empty fields such as url's and comments being completely messed up. 
Hopefully, the droid version will be fixed soon.

Original comment by matthias.c.flor on 16 Feb 2012 at 10:33

GoogleCodeExporter commented 8 years ago
@sigprof is correct. keepassx is not compatible with the way KeePassDroid is 
writing blank database entries. Keepassx is then corrupting your databases 
after you make changes there.

If you are interested in keepassx, I'd suggest filing a bug report with 
keepassx since there are other versions of KeePass that save data the same way 
KeePassDroid currently does (like the iOS version).

In the meantime, I'll look at reverting the KeePassDroid behavior to go back to 
explicitly saving the blank fields.

Original comment by bpel...@gmail.com on 18 Feb 2012 at 7:40

GoogleCodeExporter commented 8 years ago
Issue 300 has been merged into this issue.

Original comment by bpel...@gmail.com on 18 Feb 2012 at 7:43

GoogleCodeExporter commented 8 years ago
Fixed in 1.9.9. You'll need to save your database in KeePassDroid again, and it 
will work around keepassx's problems.

Original comment by bpel...@gmail.com on 18 Feb 2012 at 9:38