nazarewk / keyring_pass

Password Store (pass) backend for python's keyring
MIT License
18 stars 5 forks source link

Invalid directory created when key-prefix set to '' --- works with . (dot) #3

Closed matthewsht closed 3 years ago

matthewsht commented 3 years ago

Got a chance to test new version v0.7.0 of keyring_pass.

I'm getting the following error with python 3.6 using keyring 21.5.0

keyring -b keyring_pass.PasswordStoreBackend set local/monkey shine Keyring config file contains incorrect values. Config file: /Users/matthewsht/.config/python_keyring/keyringrc.cfg Password for 'shine' in 'local/monkey':

The config file (~/.config/python_keyring/keyringrc.cfg) contains only [pass] key-prefix=.

I've checked for extraneous whitespace in the config and don't see any. With key-prefix=. the password ends up at local/monkey -- which is correct.

According to the documentation, key-prefix='' should also have worked but did not - I got a directory named ''/local/monkey at the top of tree which was not intended:

pass Password Store ├── '' │   └── local │   └── monkey │   └── foo OTHER ENTRIES ELIDED

matthewsht commented 3 years ago

By diving into the code I found my original problem - keyring wants the backend defined in the config file even if its set on the command line. IF this is a bug, its a keyring bug and not a keyring_pass bug. Closing