-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Data loss when database file changes without Yubikey available #5290
Comments
Any progress on the issue? |
Unfortunately the fix for this and other edge saving cases is bigger and more complex than I am comfortable releasing in a maintenance release. I'll be posting my fix very soon for review. |
Actually I've been thinking about local-master synchronization like original KeePass suggests with triggers, I can't find any suggestion on this and one of my computers is MacBook. What I want to achieve is an option to automatically sync (merge) two files in two locations on save - local in my private folder, master on cloud storage. The possibility would also be, as suggested, to enable keepass2android way of saving - check for changes, merge if different, save. This could be an additional toggle in settings. I've already faced data loss before when the files didn't get synced for a while for any reason (no Internet, sync app crashed). This is partly a feature request, partly a bug as described in original thread post, hence my comment on this. |
It is true that this data loss can occur on a password change as well. This problem occurs because we do check for underlying changes prior to saving and attempt to merge them. When the db cannot be opened due to no yuibkey or different password or whatever then the open db enters a non synced state. Pressing save or save on exit overwrites the "on disk" db causing the data loss and also reversion of the database credentials. |
Hope this is the right place to write, but it directly refers to Your last comment. Example case: In both cases the changes for one of the devices disappear. Which means I lose important data. As much as I could test this I doesn't saw a merge happening. Is there an option I missed to get it working? Is this a bug or the expected behavoir. Please tell what do You meant with merge. I currently thinking about switching to KeePassXC, because of the nicer design, totp, crossdevice and keeshare features all in one package without the hassle to configure plugins, but maybe losing important data is a no-go for me. KeePassXC - Version 2.6.2 Qt 5.15.1 Betriebssystem: Windows 10 Version 2004 Aktivierte Erweiterungen:
Kryptographische Bibliotheken: |
Just for completeness (in case this code path is somewhat different): This will also happen in a slight variant when the YubiKey is configured to require touch, but one misses the window to interact before the timeout. (I thought I'd leave one plugged in but at least set a barrier that requires someone to be physically present.) |
Dear all, I just wanted to touch base here - the proper fix is a bit beyond me. How to best proceed here? Thanks! |
If this is a problem for your workflow then you need to lock the database on the machine you do not have the yubikey plugged into |
@droidmonkey I was kind-of hoping that a possible resolution would instead detect this, and defer the merge until after the key was back. I understand how to work-around it, but is this behaviour by design and intended then and going to stay? (I understand Open Source ain't free, so if there's a way to offer a bug bounty, count me in.) |
It's on the list |
Hi, any update on when the fix for this issue would come out? Thanks! |
In relation to #9336: I think this could easily be resolved by providing a dedicated button to force sync (*), which I can press when I inserted the key. (*) That means: Initiate the exact same procedure manually, that happens when a change of the database file is detected. |
i think this issue should also get the label BUG!! |
Hey all, I'm syncing my |
Not related, although it shouldn't be happening. This usually happens when people use the same name for their browser connection on two different computers. |
First, thanks for creating such a great software, Much appreciated. However, if such a critical flaw is known for 3.5 years now I wonder if it will ever be fixed. There are not even warnings in the docs. So, what are you planning to do with it? |
Another idea to solve this issue:
Since 2. and 3. are probably quite a bit work, I would settle with 1.: Possible Text: |
- External modifications to the db file can no longer be missed. - Fixed dialogFinished signal of DatabaseOpenDialog was not emitted when dialog was closed via the 'X' (close) button - For reloading with a modified db, an additional choice has been added to allow the user to ignore the changes in the file on disk. - User is now presented with an unlock database dialog if reload fails to open the db automatically. For example when the user removed the YubiKey, failed to touch the YubiKey within the timeout period, or db pw has been changed. Fixes keepassxreboot#5290
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:
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)
The text was updated successfully, but these errors were encountered: