Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warnings about conflicting changes raised when merging with keepassxc-cli #153

Open
louib opened this issue Mar 11, 2023 · 1 comment
Open

Comments

@louib
Copy link
Collaborator

louib commented Mar 11, 2023

I'm getting a bunch of warnings when merging databases with keepassxc-cli merge after using the update_history function.
The warnings look like this:

Entry of entry_title[25ba7e55577841ba8f3ca23a96d61bc4] contains conflicting changes - conflict resolution may lose data!

The warning is raised here. I think the problems stems from the way the entries are compared here

louib added a commit that referenced this issue Mar 11, 2023
Other KDBX parsers (like the one in KeePassXC)
store all the default times as fields of a class,
instead of items in a map. The result is that
default times that are not populated will be
given a default value at parsing time. This can
result in drift between an entry and its history items,
as described in #153
Populating all the default times is thus safer
for interoperability between KDBX4 parsers.
louib added a commit that referenced this issue Mar 11, 2023
Other KDBX parsers (like the one in KeePassXC)
store all the default times as fields of a class,
instead of items in a map. The result is that
default times that are not populated will be
given a default value at parsing time. This can
result in drift between an entry and its history items,
as described in #153.
Populating all the default times is thus safer
for interoperability between KDBX4 parsers.
@louib
Copy link
Collaborator Author

louib commented Mar 11, 2023

I think the issue comes from how the TimeInfo field is parsed in KeePassXC here. Creating a new TimeInfo variable will initialize all the default times to the current timestamp, which will be detected as drift between history items, since the different versions of an entry will probably not be parsed at the same time. This fits my experience because sometimes I don't get the warnings above, which can happen if all the history items are parsed during the same second.

louib added a commit that referenced this issue Mar 12, 2023
Other KDBX parsers (like the one in KeePassXC)
store all the default times as fields of a class,
instead of items in a map. The result is that
default times that are not populated will be
given a default value at parsing time. This can
result in drift between an entry and its history items,
as described in #153.
Populating all the default times is thus safer
for interoperability between KDBX4 parsers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant