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

Database overwrite when Yubikey not allways accessible #10227

Closed
Neturius opened this issue Jan 24, 2024 · 1 comment
Closed

Database overwrite when Yubikey not allways accessible #10227

Neturius opened this issue Jan 24, 2024 · 1 comment

Comments

@Neturius
Copy link

Overview

Version: KeyPassXC 7.2.6
Clients: Windows
Database located on a Windows Fileserver (SMB share)
Yubikey 5 NFC

Steps to Reproduce

Remove Yubikey while another user is modifying database. When re-inserting the Yubikey and change something in the data the database will be overwritten without warning and thus meanwhile changes of other users are lost

Expected Behavior

Prevent overwriting if data have changed since last read

Actual Behavior

Database overwrite

Context

We use KeyPassXC in a team and realised that information entered were gone next time it was needed. We even lost access to systems after a password change because the changed password was swapped back to earlier version by KeePassXC. We used the standard settings under File management:
Automatically save after every change
Automatically save when locking database
Automatically non-data changes when locking database
Automatically reload the database when modified externally

Finally found how it happens. If user A has removed the Yubikey and user B changes data then user A will get a warning that database cannot be read after a change. If later user A plugs in the Yubikey meanwhile changes are ignored. If user A changes data then earlier changes of user B are overwritten.

To prevent this to happen we activated then the alternative saving methode to write directly to the database. Now we have a new behavior: Everytime a user is changing data all other users get a message headed "Merge Request":

The database file has changed and you have unsaved changes.
Do you want to merge your changes?
Merge / Discard

However, the other users have no unsaved changes thus usually press Discard. Now, if a user has the Yubikey unplugged when the message appears and clicks on Discard, KeePassXC overwrites the database with a zero byte file immediatly.

@Neturius Neturius added the bug label Jan 24, 2024
@droidmonkey
Copy link
Member

droidmonkey commented Jan 24, 2024

Duplicate of #5290

@droidmonkey droidmonkey marked this as a duplicate of #5290 Jan 24, 2024
@droidmonkey droidmonkey closed this as not planned Won't fix, can't repro, duplicate, stale Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants