-
-
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
[PRE-RELEASE] Simultaneous editing doesn't work properly #3651
Comments
Stupid question, but do you have the setting to auto-reload the database on external changes on? |
Stupid questions don't exist :) It just reveals I should have added more details. Settings:
The database change detection is correctly working when users update the database one at a time. |
That rang a bell on my side. The "Automatically save after every change" setting leads to the situation I'm describing. Disabling it will just result on other complex situations, with inconsistency between users GUI Clients. eg. If one user saves his modifications while another one didn't yet saved his own modifications, the Merge Request will popup. Once merged, both GUI with be inconsistent, and merged instance won't be savable anymore ... |
When you say validate entry, that means pressing OK on the entry edit page, correct? In other words, this only happens when the entry edit view is active? What i don't understand is why the "check database file prior to save" is not kicking in. This was a major improvement put in by that PR. |
For some context the way I tested this feature was to disable the various file notifications in the code one by one to make sure it's still worked at the end of the day. |
The easier way to reproduce the behavior is to uncheck the Setting "Start only a single instance of KeePassXC" in order to have two KeePassXC instances on the same computer. In following examples, I simulated parallel usage of the same keepassx database by using 2 local instances of KeepassXC. The behavior is the same than two KeepassXC on two computers with a network-shared database. Even if the scenarios may seems complicated, they are likely to be faced in real conditions. Scenario 1: Data lossUser A (left) and User B (right) are modifying the same keepassx database.
Update: the "Scenario 2: merging issue" previously described was likely due to a mistake by using an instance with 2.5.0-SNAPSHOT and the other with 2.4.3 ! |
Ok fantastic, I should be able to fix this today |
* Fix #3651 * Correct data loss when the database reloads due to a file change while creating a new entry. The issue occurred due to the "new parent group" pointer being invalid after the database is reloaded following merge. * Also fix re-selecting entries following database file reload. If the entry was moved out of the current group it would result in an assert hit. This fix prevents recursively looking for the entry.
* Fix keepassxreboot#3651 * Correct data loss when the database reloads due to a file change while creating a new entry. The issue occurred due to the "new parent group" pointer being invalid after the database is reloaded following merge. * Also fix re-selecting entries following database file reload. If the entry was moved out of the current group it would result in an assert hit. This fix prevents recursively looking for the entry.
Expected Behavior
When two or more users are working on a same keepassx database, creating, editing or deleting actions are not conflicting between users without being notified.
Current Behavior
Two users or more simultaneously editing an entry (same or different) will result on only the first to validate the modification will have it saved in the database.
Possible Solutions
Steps to Reproduce
User A and User B are using KeepassXC on their own computer and are modifying the same keepassx database which is stored on a CIFS server.
Context
We noticed this bug since PR #3612 allows us to have multiple users working on the same keepassx database. This bug was certainly present before the PR.
We only use Linux systems, so couldn't try to reproduce the bug on Windows systems.
Debug Info
KeePassXC - Version 2.5.0-snapshot
Build Type: Snapshot
Revision: 4cc06f9
Qt 5.11.3
Debugging mode is disabled.
Operating system: Debian GNU/Linux 10 (buster)
CPU architecture: x86_64
Kernel: linux 4.19.0-5-amd64
Enabled extensions:
Cryptographic libraries:
libgcrypt 1.8.4
The text was updated successfully, but these errors were encountered: