pfn / keepasshttp

KeePass plugin to expose password entries securely (256bit AES/CBC) over HTTP
GNU General Public License v3.0
2k stars 275 forks source link

Parentheses in ID cause lookup to return null value #411

Open jaybeers opened 2 years ago

jaybeers commented 2 years ago

If the entry name/ID you're looking up has parentheses in it, the get method won't find it and you'll get a null response. For example, say you have a KeePass entry with the name "Email (work)"; the following call to .get() will return None (in Python terms). I'm doing the lookups from a Python script I wrote; here's a minimalist version of the code I'm using.

import keepasshttp

association_key_filename = "association_key.bin"
entry_name               = "Email (Work)"

kph = keepasshttp.KeePassHTTP(
    storage = association_key_filename,
)

print(kph.get(entry_name))

Lookups for other entries work fine, and I was also able to look this entry up after I changed the name to "Email - Work". I'm including the versions of everything below, including my other plugins which I'm guessing aren't relevant, but I suppose one never knows. :slightly_smiling_face:

Component Version
KeePass 2.44
KeePassHTTP 1.8.4.2
KeePassRPC 1.14.0.0
KeeTrayTOTP 0.108.0.0