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

fix: throw helpful error when appId is not numeric #402

Merged
merged 1 commit into from
Sep 28, 2022
Merged

fix: throw helpful error when appId is not numeric #402

merged 1 commit into from
Sep 28, 2022

Conversation

joekrill
Copy link
Contributor

@joekrill joekrill commented Sep 28, 2022

Currently the appId is checked only for a truthy value, but it's actually required to be numeric, as well - getAppAuthentication assumes it is. If it is not, it results in the iss property of the JWT being set to NaN and causing an authentication failure.

This adds an additional check to make sure appId is a finite number or can be coerced into a finite number.

partly addresses #375

@gr2m gr2m added the Type: Bug Something isn't working as documented, or is being fixed label Sep 28, 2022
Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gr2m gr2m changed the title throw helpful error when appId is not numeric fix: throw helpful error when appId is not numeric Sep 28, 2022
@gr2m gr2m merged commit 30785b5 into octokit:master Sep 28, 2022
@github-actions
Copy link
Contributor

🎉 This PR is included in version 4.0.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented, or is being fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants