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 an Entry does not delete attachments in it #397

Open
nkr0 opened this issue Jul 16, 2024 · 0 comments
Open

Deleting an Entry does not delete attachments in it #397

nkr0 opened this issue Jul 16, 2024 · 0 comments

Comments

@nkr0
Copy link

nkr0 commented Jul 16, 2024

Deleting an Entry does not seem to remove attachments.

import pykeepass

kp = pykeepass.create_database("test")
e = kp.add_entry(kp.root_group, "title", "username", "password")
a = kp.add_binary(b"attachment data bytes string", False, False)
e.add_attachment(a, "attachment")
kp.dump_xml("before.xml")
print("before deleting entry", kp.binaries[a])
kp.delete_entry(e)
kp.dump_xml("after.xml")
print("after deleting entry", kp.binaries[a])

In secrets this can cause orphaned objects to be present in the database. https://gitlab.gnome.org/World/secrets/-/issues/574

P.S. PyKeePass.dump_xml does not seem to include binaries/attachments in it.

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

No branches or pull requests

1 participant