Skip to content

Deleting a directory sometimes deletes the entire password store including git repositories #556

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

Closed
FSMaxB opened this issue Dec 11, 2020 · 5 comments · Fixed by #604
Closed
Labels

Comments

@FSMaxB
Copy link
Contributor

FSMaxB commented Dec 11, 2020

Describe the bug
Sometimes when trying to delete a subdirectory, the entire password store get's deleted.

To Reproduce
I am not sure on how to actually reproduce this, but it happened to me several times. Thank god for backups!
If I find the time, I can start experimenting. It might be related to the search functionality in some way.

Expected behavior
Only the subdirectory should be deleted, not the entire password store.

Screenshots
QtPass-deletes-everything

Desktop (please complete the following information):

  • OS/Distribution: Archlinux
  • Version 1.3.2

Additional context
I use multiple profiles

@FSMaxB FSMaxB added the bug label Dec 11, 2020
@FSMaxB FSMaxB changed the title Deleting a director sometimes deletes the entire password store including git repositories Deleting a directory sometimes deletes the entire password store including git repositories Dec 11, 2020
@FSMaxB
Copy link
Contributor Author

FSMaxB commented Jan 22, 2023

It just happened again. I was deleting an empty directory that I had just created and that's when it happened.
Still not able to reliably reproduce it though.

@FSMaxB
Copy link
Contributor Author

FSMaxB commented Jan 22, 2023

I just found out how to reproduce it!

  1. Add a new password store for testing in the settings.
  2. Make sure to select it (you don't want to accidentally delete your passwords)
  3. Run PASSWORD_STORE_DIR=. pass init <gpg-id> to initialize the new password store.
  4. Create a new victim password to be deleted.
  5. Create a new directory called empty
  6. Search for empty in the search bar
  7. Klick on empty in the search results. (Note: It is not highlighted as selected when clicking on it)
  8. Press the delete key. A dialog box will appear:
    grafik
  9. It tells you that it will delete /. If you then click yes, it will delete your entire password store, including the main directory itself

@FSMaxB
Copy link
Contributor Author

FSMaxB commented Jan 22, 2023

Did some further digging. It's actually much easier to trigger. It happens when the list of passwords is selected but no item in the tree of passwords and directories.

You can achieve this by one of the following:

  • Click in the list of passwords, but not on any of the entries (e.g. right below the last item)
  • Search for nonsense and then click in the empty list
  • Use tab to select it (without having any item in the list selected)

@FSMaxB
Copy link
Contributor Author

FSMaxB commented Jan 22, 2023

Note that in those cases, the ui->actionDelete button is disabled, but you can still trigger the delete action with the delete key.

@FSMaxB
Copy link
Contributor Author

FSMaxB commented Jan 22, 2023

PR incoming!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant