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

crash if reference is broken #384

Closed
br-olf opened this issue Mar 10, 2024 · 0 comments
Closed

crash if reference is broken #384

br-olf opened this issue Mar 10, 2024 · 0 comments

Comments

@br-olf
Copy link
Contributor

br-olf commented Mar 10, 2024

I think I found a bug in the following code:

value = value.replace(ref, getattr(ref_entry, wanted_field))

This crashes when there is a broken reference in the username field.

I messed with the references in my database and suddenly keepmenu crashed. I dug deeper and I think this is actually a bug of pykeepass.

See the also the bug report in keepmenu:
firecat53/keepmenu#160

br-olf added a commit to br-olf/pykeepass that referenced this issue Mar 21, 2024
br-olf added a commit to br-olf/pykeepass that referenced this issue Mar 22, 2024
This commit introduces a check before a referenced entry is
resolved. If the referenced entry is not found `deref` will return
`None`. The commit also includes a test case for this behavior.

Fixes: libkeepass#384
@Evidlo Evidlo closed this as completed in 83440f4 Apr 9, 2024
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