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

Deleting Groups with active KeeShare sync configuration and recreate of them, deletes all entries in the original db #7300

Open
mgeramb opened this issue Jan 18, 2022 · 3 comments

Comments

@mgeramb
Copy link

mgeramb commented Jan 18, 2022

Steps to reproduce:

  • Create new KeyPass DB with name "Shared"
  • Save it as "Shared.kdbx"
  • Create one Entry "Test" in the "Shared" DB
  • Close DB
  • Create new KeyPass DB with name "MyDb"
  • Save it as "MyDb.kdbx"
  • Create new Group 'Sync Shared' in "MyDB" and select KeeShare
  • Select "Syncronize" as type, enter the path of "Shared.kdbx" and enter the password
  • Close the dialog with "Ok" button. The "Test" entry will be shown in the group "Sync Shared"
  • Delete the group "Sync Shared". The group will now be shown in the Recycle Bin
  • Delete the group in the Recylce Bin
  • Create new Group 'Sync Shared' in "MyDB" and select KeeShare
  • Select "Syncronize" as type, enter the path of "Shared.kdbx" and enter the password
  • Close the dialog with "Ok" button

Current Result:
The "Test" entry will not be shown in the Group "Sync Shared"
If you open the DB "Shared.kdbx" the "Test" entry is also missing there.

Expected Result:
The "Test" entry should be shown in the group "Sync Shared" and in the "Shared" database

@mgeramb mgeramb added the bug label Jan 18, 2022
@mgeramb mgeramb changed the title Deleting Sync KeeShare Groups and recreate them, deletes all entries in the original db Deleting Groups with active KeeShare sync configuration and recreate of them, deletes all entries in the original db Jan 18, 2022
@droidmonkey
Copy link
Member

This is the exact issue described in #6477

@mgeramb
Copy link
Author

mgeramb commented Jan 19, 2022

@droidmonkey :
I'am not sure if this is exactly the same issue descripted in #6477, Maybe the technical reason in the background is the same, but I not read anything about deleting the whole shared group. This was the reason for me to provide this information. If you know that this has the same technical background, you can close this issue.

My comment in #6477 is another one. This is only related to the current 2.7 beta version and it seems that it has an other technical reason.

@droidmonkey
Copy link
Member

droidmonkey commented Jan 19, 2022

Yes it's the same technical reason, but your description and recreate steps are really good. The reason any of this happens is because when you delete an object from your database, a deleted object uuid is stored forever in the kdbx backend for merging purposes. The problem arises with keyshare because you reintroduce an entry with the same uuid as the one you deleted, the merge algorithm says it needs to be deleted.

The fix I have in the pipeline is to give entries new uuids if they are moved outside the share group. Basically treat the share group as an internal database. Right now the databases essentially get flattened into each other which causes these problems.

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