-
Notifications
You must be signed in to change notification settings - Fork 96
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
unescaped slashes for entry names/paths #205
Comments
How do you create these entries? |
using KeepassXC "new group" |
I'm thinking it's not an issue of PyKeePass but rather of KeepassXC and it's way of inserting entries. >>> from pykeepass import PyKeePass as P
>>> kp = P("<somewhere>", password="pass")
>>> kp.entries[17].group.group.group.group.name
'Root'
>>> kp.entries[17].group.group.group.name
'foobar_group'
>>> kp.entries[17].group.group.name
'subgroup/name'
>>> kp.entries[17].group.name
'hello/hi'
>>> kp.entries[17].title
'My/super/entry'
>>> kp.entries[17].group.path
'foobar_group/subgroup/name/hello/hi/'
>>> kp.entries[17].group.group.path
'foobar_group/subgroup/name/'
>>> kp.entries[17].group.group.group.path
'foobar_group/'
>>> kp.entries[17].group.group.group.group.path
'/'
>>> kp.add_entry(kp.entries[17].group, title="path/test", username="user/name", password="pass/word")
Entry: "foobar_group/subgroup/name/hello/hi/path/test (user/name)"
>>> kp.entries[18]
Entry: "foobar_group/subgroup/name/hello/hi/path/test (user/name)"
>>> kp.entries[18].username
'user/name'
>>> kp.entries[18].password
'pass/word'
>>> kp.entries[18].title
'path/test'
>>> kp.entries[18].path
'foobar_group/subgroup/name/hello/hi/path/test'
>>> kp.entries[18].group.path
'foobar_group/subgroup/name/hello/hi/'
>>> kp.find_groups(name="hello/hi", first=True)
Group: "foobar_group/subgroup/name/hello/hi/" |
The KeePass spec allows |
But then it's as good delimiter as any other due to keepass allowing almost everything in there. We can do spaces between the paths or choose a new delimiter (e.g. We might also do some bracketing for visibility e.g.:
|
The safest thing would be to return a list instead of a string, but this is
a breaking change. What are you using paths for?
…On Oct 10, 2020 2:29 AM, "Peter Badida" ***@***.***> wrote:
But then it's as good delimiter as any other due to keepass allowing
almost everything in there. We can do spaces between the paths or choose a
new delimiter (e.g. > )and the same issue will be opened later.
We might also do some bracketing for visibility e.g.:
[Root]/[Group/with/slash]/[Title]
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#205 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJT7YP46EFRGHP2YXOWVKDSKAEOFANCNFSM4SKA5A5A>
.
|
@Evidlo Not necessarily, we can just add a new attribute and keep the original path in place. This way it won't be a breaking change and people who'd want to use the list would be able to. |
@Evidlo whats about represeting as a graph? |
@KeyWeeUsr Yes exactly :-) When do you plan to merge this? |
I think I'll make this a breaking change and release it with the next major version. |
cool, do you have a timeline for that? |
Check out https://github.com/libkeepass/pykeepass/tree/pathlist and let me know what you think. I may do a major release in the next couple of weeks. |
@Evidlo any updates here? :) |
|
As a downstream user I have to say that I would have preferred a fixed up path2 attribute instead of a breaking change in order to avoid version dependent-behavior changes. Especially, given that the version variable itself is not guaranteed to be there (as it was just introduced a version earlier). |
Hey there,
thank you for creating this awesome library!
I have noticed that entry names are not escaped. This leads to wrong path names, as you can see here:
Test/Entry is a password in Test/datenbank within the path ../Datenbanken/
Is it possible to escape those names? Or any known workarounds for this?
Thanks in advance!
EDIT
The text was updated successfully, but these errors were encountered: