Synchronization does not synchronize auto-type settings
A lightweight and easy-to-use password manager
Brought to you by:
dreichl
STEPS TO REPRO
1. create a database FOO.kdbx and insert some entries in it; then save
2. create a copy BAR.kdbx of FOO.kdbx
3. open BAR.kdbx and change some entries; for some of them, change the Auto-Type sequence (change the default sequence of the root group or override the default in a specific group/entry)
4. save BAR.kdbx
5. open FOO.kdbx, change some entries, save and then synchronize with BAR.kdbx
EXPECTED BEHAVIOUR
Changes from BAR.kdbx are merged into FOO.kdbx, including Auto-Type sequence changes for groups and entries.
ACTUAL BEHAVIOUR
Most changes from BAR.kdbx are merged into FOO.kdbx, but Auto-Type sequence changes are not.
Using Keepass 2.26.
Are you saying that Auto-Type changes at group level are not merged, or changes in an entry? Please post a simple change that we can test - 2 databases with the changes ready to sync would be even better.
cheers, Paul
In my environment I can easily reproduce the problem at both group level and in a specific entry. I tried to reproduce on a simple test case database, but I couldn't get this to happen at all levels. However I got something useful. Download:
https://dl.dropboxusercontent.com/u/55072601/TestKeepass.7z
Then Open Test2.kdbx (master password is 123). Right click on the root group (named "Test1") and change the Auto-Type sequence from "{CLEARFIELD}{UserName}{TAB}{Password}{ENTER}" (the current value) to "{HOME}+{END}{DELETE}{UserName}{TAB}{Password}{ENTER}". Then save. Now open Test1.kdbx (from which Test2.kdbx was generated) and do File | Synchronize | Synchronize with File... and choose Test2.kdbx. I would expect to see the new Auto-Type sequence "{HOME}+{END}{DELETE}{UserName}{TAB}{Password}{ENTER}" set in the root group of Test1.kdbx, but I still see the old one with {CLEARFIELD}. Now go back to Test2.kdbx... and you'll see that the older sequence with {CLEARFIELD} was applied to Test2 too!
So, the synchronization is copying the Auto-Type setting in the wrong direction.
Works for me. I exported the databases prior to a sync to confirm the timestamps and changes - see below.
Test1
Test2 after change
cheers, Paul
If I undnerstand the XML correctly, this is not the correct result. As I said, I set "{HOME}+{END}{DELETE}{UserName}{TAB}{Password}{ENTER}" in Test2 and then I synchronize Test1 to Test2. I would expect to see "{HOME}+{END}{DELETE}{UserName}{TAB}{Password}{ENTER}" in Test1 root group, too, but I still see "{CLEARFIELD}{UserName}{TAB}{Password}{ENTER}". Instead, Test2 gets "{CLEARFIELD}{UserName}{TAB}{Password}{ENTER}", which is wrong. In other words, the synchronization goes Test1=>Test2 instead of Test2=>Test1.
What you are describing is the expected sync behavior of root-group properties and most database settings which is different than that of entries. As far as I know this has always been the behavior of KeePass 2.x sync. I verified that it has been the behavior since at least the first non-Beta version (v 2.09).
Entries are synced based on their modification time. The most recently modified version of an entry becomes the current entry. Older entry versions become part of the entry history.
root-group properties and most database settings are not synced based on the modification time. Instead the root-group properties and database settings of the active database overwrite the corresponding properties and settings in the target database file during a sync.
Non-root group property sync behavior is property specific. A few database settings (e.g. the recycle bin setting & Entry templates group) sync based on modification time.
As mentioned in the synchronization documentation, its complicated.
Last edit: wellread1 2014-06-24
Below is a list of the Database setting and group property sync behavior in KeePass 2.26 determined by testing.
for new entries:
transformations:
items/entry:
size/entry (MB):
key (days):
key (days):
in group:
group:
auto-type sequence button:
in group:
in group:
auto-type sequence button:
Last edit: wellread1 2014-06-24
Thanks for reporting this issue and the detailed analysis :-)
I've now implemented the following:
Root group properties are now synchronized based on the last modification time.
Added synchronization support for the group behavior properties 'Auto-Type for entries in this group' and 'Searching entries in this group'.
Here's the latest development snapshot for testing:
http://keepass.info/filepool/KeePass_140624.zip
Best regards,
Dominik