Skip to content

pass_collaborate undesired behaviour - gpg keys without email causes premature termination #13

@christofalpo

Description

@christofalpo

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

  1. Install a public key in you key-ring where the first uid does not contain an email address.
  2. Try to perform pass_collaborate access
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions