Menu

#1261 Synchronization does not synchronize auto-type settings

KeePass_2.x
closed
nobody
None
5
2014-06-24
2014-06-23
mauromol
No

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.

Discussion

  • Paul

    Paul - 2014-06-23

    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

     
  • mauromol

    mauromol - 2014-06-23

    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.

     
  • Paul

    Paul - 2014-06-23

    Works for me. I exported the databases prior to a sync to confirm the timestamps and changes - see below.

    Test1

        <Root>
            <Group>
                <UUID>Mn151RXH0E+StaoXrSXfxw==</UUID>
                <Name>Test1</Name>
                <Notes />
                <IconID>49</IconID>
                <Times>
                    <CreationTime>2014-06-23T12:18:29Z</CreationTime>
                    <LastModificationTime>2014-06-23T12:19:02Z</LastModificationTime>
                    <LastAccessTime>2014-06-23T12:24:09Z</LastAccessTime>
                    <ExpiryTime>2014-06-22T22:00:00Z</ExpiryTime>
                    <Expires>False</Expires>
                    <UsageCount>6</UsageCount>
                    <LocationChanged>2014-06-23T12:18:29Z</LocationChanged>
                </Times>
                <IsExpanded>True</IsExpanded>
                <DefaultAutoTypeSequence>{CLEARFIELD}{UserName}{TAB}{Password}{ENTER}</DefaultAutoTypeSequence>
    

    Test2 after change

        <Root>
            <Group>
                <UUID>Mn151RXH0E+StaoXrSXfxw==</UUID>
                <Name>Test1</Name>
                <Notes />
                <IconID>49</IconID>
                <Times>
                    <CreationTime>2014-06-23T12:18:29Z</CreationTime>
                    <LastModificationTime>2014-06-23T13:01:15Z</LastModificationTime>
                    <LastAccessTime>2014-06-23T13:01:15Z</LastAccessTime>
                    <ExpiryTime>2014-06-22T23:00:00Z</ExpiryTime>
                    <Expires>False</Expires>
                    <UsageCount>7</UsageCount>
                    <LocationChanged>2014-06-23T12:18:29Z</LocationChanged>
                </Times>
                <IsExpanded>True</IsExpanded>
                <DefaultAutoTypeSequence>{CLEARFIELD}{UserName}{TAB}{Password}{ENTER}1</DefaultAutoTypeSequence>
    

    cheers, Paul

     
  • mauromol

    mauromol - 2014-06-23

    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.

     
  • wellread1

    wellread1 - 2014-06-24

    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
  • wellread1

    wellread1 - 2014-06-24

    Below is a list of the Database setting and group property sync behavior in KeePass 2.26 determined by testing.


    Setting Location Setting Name Sync Type
    db setting:General Database name: Modified time
    db setting:General Database description: Modified time
    db setting:General Default username
    for new entries:
    Modified time
    db setting:General Custom database color: Active db overwrite
    db setting:Security Encryption algorithm: Could not check
    db setting:Security Number of key
    transformations:
    Active db overwrite
    db setting:Compression Algorithm: Active db overwrite
    db setting:Recycle Bin Use a recycle bin: Modified time
    db setting:Recycle Bin Recycle bin group: Modified time
    db setting:Advanced Entry templates group: Modified time
    db setting:Advanced Limit number of history
    items/entry:
    Active db overwrite
    db setting:Advanced Limit history
    size/entry (MB):
    Active db overwrite
    db setting:Advanced Recommend changing
    key (days):
    Active db overwrite
    db setting:Advanced Force changing the
    key (days):
    Active db overwrite
    root grp prop:General Name: Active db overwrite
    root grp prop:General Icon: Active db overwrite
    root grp prop:General Expires: Active db overwrite
    root grp prop:General Expiry date: Active db overwrite
    root grp prop:Notes Notes: Active db overwrite
    root grp prop:Behavior Auto-Type for entries
    in group:
    Active db overwrite
    root grp prop:Behavior Searching entries in
    group:
    Active db overwrite
    root grp prop:Auto-Type Inherit/Override
    auto-type sequence button:
    Active db overwrite
    std grp prop:General Name: Modified time
    std grp prop:General Icon: Modified time
    std grp prop:General Expires: Modified time
    std grp prop:General Expiry date: Modified time
    std grp prop:Notes Notes: Modified time
    std grp prop:Behavior Auto-Type for entries
    in group:
    Active db overwrite
    std grp prop:Behavior Searching entries
    in group:
    Active db overwrite
    std grp prop:Auto-Type Inherit/Override
    auto-type sequence button:
    Modified time
     

    Last edit: wellread1 2014-06-24
  • Dominik Reichl

    Dominik Reichl - 2014-06-24
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 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

     

Log in to post a comment.