Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

empty expected audience array should throw InvalidClaimException #679

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

jimmyjames
Copy link
Contributor

@jimmyjames jimmyjames commented Nov 29, 2023

Changes

Currently, validating a JWT expecting an empty string array fails with a NPE, instead of an InvalidClaimException, as discussed in #674. This change fixes that.

It also includes a small refactor to the audience validation logic, replacing the terse conditional with clearer and more extendable logic. That change was done in a commit prior to making any logic changes to ensure no unintended changes.

Fixes #674.

@jimmyjames jimmyjames requested a review from a team as a code owner November 29, 2023 16:11
@jimmyjames jimmyjames marked this pull request as draft November 29, 2023 16:24
@jimmyjames jimmyjames marked this pull request as ready for review November 30, 2023 15:10
@jimmyjames jimmyjames merged commit d5c05d7 into master Dec 1, 2023
7 checks passed
@jimmyjames jimmyjames deleted the empty-aud-array-validation branch December 1, 2023 12:48
This was referenced Jan 22, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullPointerException when checking empty audience
2 participants