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

Continue in kolide_jwt when rawData is empty #1751

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

Micah-Kolide
Copy link
Contributor

Attempting to pass an empty or null token to the jwt parser will cause a fatal error (ErrTokenMalformed) and panic (panic: runtime error: invalid memory address or nil pointer dereference). I'm simply checking that the rawData is not of length 0, otherwise throw the same error (error reading JWT data file) before trying to hand it off to the jwt parser.

Something I should've caught previously, but I did not have a test for it. I do now.

@Micah-Kolide Micah-Kolide force-pushed the micah/jwt_continue_if_no_data branch from a82e361 to f1d0884 Compare June 13, 2024 20:53
@Micah-Kolide Micah-Kolide marked this pull request as ready for review June 13, 2024 20:54
@Micah-Kolide Micah-Kolide added this pull request to the merge queue Jun 13, 2024
Merged via the queue into main with commit aefa457 Jun 13, 2024
31 checks passed
@Micah-Kolide Micah-Kolide deleted the micah/jwt_continue_if_no_data branch June 13, 2024 21:36
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 this pull request may close these issues.

3 participants