-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Data loss when database file changes without Yubikey available #5290
Copy link
Copy link
Description
I was thinking of filing a new issue but maybe this is the same problem. I incur data loss on sync, silently, which is very very critical. Steps:
- Encrypt database with master password + Yubikey.
- Sync via a cloud provider and open same database from two machines.
- Modify database on machine A and save it. Let cloud sync client sync the new file.
- KeePassXC on machine B will detect the file update, and try to reload the database.
- Machine B will fail doing so, because the Yubikey is not inserted. Instead of displaying an error message or prompting for Yubikey entry, KeePass will ignore the new database update and will include a "*" character in its status bar, prompting the user to save unsaved changes (of which there are none). These unsaved changes is actually the older version of the database, and once a user saves this then boom, the new modifications from machine A are wiped out. Ouch.
- Repeat 1-5 but with Yubikey inserted in machine B when it receives the new database update, the program prompts me to press my Yubikey button (I've configured it so), and reloads the database as expected. New updates are visible.
Fix directions: this is a critical issue, so I think that two steps are necessary:
1- when saving unsaved changes, KeePassXC should check if the current database file does not include new entries or updates, in which case it should require user authorisation or merge the changes. This is the behaviour of Keepass2Android
2- when reloading an updated database file, fail HARD if the file could not be loaded, and force the user to provide a decryption mechanism.
Originally posted by @Zvezdin in #5284 (comment)
Reactions are currently unavailable