Skip to content
New issue

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

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

Already on GitHub? # to your account

Database file refresh doesn't occur when entry or group is being edited #8545

Closed
LudekH2 opened this issue Oct 5, 2022 · 3 comments · Fixed by #10612
Closed

Database file refresh doesn't occur when entry or group is being edited #8545

LudekH2 opened this issue Oct 5, 2022 · 3 comments · Fixed by #10612
Assignees
Milestone

Comments

@LudekH2
Copy link

LudekH2 commented Oct 5, 2022

Overview

We are using Windows version KeePassXC 2.7.1. Database is located on network share. When two users are performing edit on the database (different entries) in the same time, changes of the one that save his edit first are lost.

Steps to Reproduce

  1. Two users open database
  2. Both open and edit some entry in the database in the same time.
  3. User 1 saves his changes - he can see them in his KeepassXC after that.
  4. User 2 saves his changes. When he look at the entry edited by user 1 he does not see the recent changes made by user 1.
  5. User 1 close and re-open database. He does not see his recent changes, they are lost.

Expected Behavior

I expect any edits not to disappear from database used in network shared environment.

Actual Behavior

When I do not edit database and other user save his changes to the database I can see the refresh on my side. I suppose his changes are synced with my instance of the application and all is well.
However if I have open any entry and I am editing it, in the time he does his save, the refresh apparently does not take place and after I save my changes to the database, his changes are overwritten by my, now outdated version.

Context

KeePassXC - Verze 2.7.1
Revision: 5916a8f

Operating System: Windows 10 + Windows Server 2016 as fileserver
Desktop Env:
Windowing System:

@LudekH2 LudekH2 added the bug label Oct 5, 2022
@droidmonkey
Copy link
Member

This is a complicated problem because we don't want to refresh the database while you are actively editing it, however our file manager should have seen that the underlying file changed prior to saving and merge in those changes first. That clearly failed so there is a bug here or the style of network share being used has a cache mechanism that prevents this detection.

@droidmonkey droidmonkey changed the title Lost changes in Windows network environment (UNC share) Database file refresh doesn't occur when entry or group is being edited Oct 5, 2022
@droidmonkey droidmonkey self-assigned this Oct 5, 2022
@LudekH2
Copy link
Author

LudekH2 commented Oct 5, 2022 via email

@droidmonkey
Copy link
Member

I just fixed the above freeze problem.

@droidmonkey droidmonkey added this to the v2.8.0 milestone Feb 22, 2023
@phoerious phoerious removed the bug label Nov 22, 2024
pull bot pushed a commit to Graysonbarton/keepassxc that referenced this issue Feb 1, 2025
…keepassxreboot#10612)

Fixes keepassxreboot#5290 
Fixes keepassxreboot#9062
Fixes keepassxreboot#8545 

* Fix data loss on failed reload

- 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.
- Mark db as modified when db file is gone or invalid.
- Prevent saving when db is being reloaded
- If merge is triggered by a save action, continue on with the save action after the user makes their choice

---------

Co-authored-by: vuurvlieg <vuurvli3g@protonmail.com>
Co-authored-by: Jonathan White <support@dmapps.us>
droidmonkey added a commit that referenced this issue Feb 2, 2025
…#10612)

Fixes #5290
Fixes #9062
Fixes #8545

* Fix data loss on failed reload

- 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.
- Mark db as modified when db file is gone or invalid.
- Prevent saving when db is being reloaded
- If merge is triggered by a save action, continue on with the save action after the user makes their choice

---------

Co-authored-by: vuurvlieg <vuurvli3g@protonmail.com>
Co-authored-by: Jonathan White <support@dmapps.us>
pull bot pushed a commit to blog2i2j/keepassxreboot.._..keepassxc that referenced this issue Feb 22, 2025
…keepassxreboot#10612)

Fixes keepassxreboot#5290 
Fixes keepassxreboot#9062
Fixes keepassxreboot#8545 

* Fix data loss on failed reload

- 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.
- Mark db as modified when db file is gone or invalid.
- Prevent saving when db is being reloaded
- If merge is triggered by a save action, continue on with the save action after the user makes their choice

---------

Co-authored-by: vuurvlieg <vuurvli3g@protonmail.com>
Co-authored-by: Jonathan White <support@dmapps.us>
jopamo pushed a commit to jopamo/keepassxc that referenced this issue Mar 1, 2025
…keepassxreboot#10612)

Fixes keepassxreboot#5290 
Fixes keepassxreboot#9062
Fixes keepassxreboot#8545 

* Fix data loss on failed reload

- 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.
- Mark db as modified when db file is gone or invalid.
- Prevent saving when db is being reloaded
- If merge is triggered by a save action, continue on with the save action after the user makes their choice

---------

Co-authored-by: vuurvlieg <vuurvli3g@protonmail.com>
Co-authored-by: Jonathan White <support@dmapps.us>
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants