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

Possible bug in skipping keys when keyIDs don't match #85

Open
trishankatdatadog opened this issue Jun 6, 2024 · 0 comments
Open

Possible bug in skipping keys when keyIDs don't match #85

trishankatdatadog opened this issue Jun 6, 2024 · 0 comments

Comments

@trishankatdatadog
Copy link

Currently, this line appears to be incorrectly skipping a key when its keyID don't match the one from the signature.

For example, if the key's keyID is missing and needs to be computed, then the error would be nonnil, and the keyID would be empty, but it appears that the IF condition above wouldn't catch it.

The IF condition above seems to be making the mistake of doing two things in one (handling edge cases and but also catching an error). The impact shouldn't be high as the next error handling should ultimately skip any mismatching keys anyway (unless there is a bug in the key's verifier itself). I recommend simplifying the IF condition do to what was actually intended.

Cc @adityasaky

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

No branches or pull requests

1 participant