Skip to content
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

verifyAllUsers() returns userID error for keys that contains image data #1636

Closed
martgil opened this issue Apr 25, 2023 · 2 comments · Fixed by #1637
Closed

verifyAllUsers() returns userID error for keys that contains image data #1636

martgil opened this issue Apr 25, 2023 · 2 comments · Fixed by #1637

Comments

@martgil
Copy link
Contributor

martgil commented Apr 25, 2023

  • OpenPGP.js version: "openpgp": "^5.8.0"
  • Affected platform (Browser or Node.js version): Node.js (I haven't tried for the Browser version/dist)

Description:

During my testing, OpenPGP.js verifyAllUsers() fails to work and returns TypeError: Cannot read properties of null (reading 'userID') when parsing a public key/key pair that contains image data. eg image added with gpg's addphoto command.

image

image

File to use:
sample.pub.txt

Steps to reproduce:

const key = `$armored_key`;
const k = openpgp.readKey({armoredKey: key});
const vk = (await k).verifyAllUsers(k);
console.log(vk);
@twiss
Copy link
Member

twiss commented Apr 25, 2023

Hey 👋 Thanks for the report! Indeed it seems like this function doesn't take User Attributes into account. We'd welcome a PR to fix this :)

@martgil
Copy link
Contributor Author

martgil commented Apr 27, 2023

Thank you! I attempted to fix this issue on #1637 based on the original issue. I'd love to contribute to OpenPGP.js as much as I'd like but if the fix requires more in-depth javascript skills - It's sad to say but I'm not really good at JS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants