-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
If you have gpg-keys where the first uid does not contain a name and an email pass_collaborate will throw an exception and stop parsing keys
Steps to reproduce
- Install a public key in you key-ring where the first uid does not contain an email address.
- Try to perform pass_collaborate access
- pass_collaborate throws exception: validation error for PassStore
Current behavior
In pass_collaborate v.0.2.2 in adapters.py line 157 the match is only on key['uids][0] , e.i. the first uid returned for the public keys.
If re.match(...) does not find a complete match there, the match is empty and the exception is thrown.
Desired behavior
It would be more appropriate to try to find matches within all uids in all keys, or to just skip keys that does not match the required name + email attributes. In this way the collaboration can still be validated, but without the matching being stuck (and without requirements on keys within the gpg key ring).
Environment
python -c "import pass_collaborate.version; print(pass_collaborate.version.version_info())":
pass_collaborate: 0.2.2
Python: 3.13.0
Platform: Linux-6.11.5-300.fc41.x86_64-x86_64-with-glibc2.40