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

Fixed whoami crash when IDP returns null claims #65

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

emmdurin
Copy link
Contributor

When an IDP returns a claim with a null value, the /whoami return a 500 error because of a NullPointerException in Spring Security (claimValue is null in Assert lambda in ClaimAccessor::getClaimAsStringList, which handles non-existing claim or existing not null claim, but does not handle existing null claims).

Fixed by removing null claims from the decoded token before giving it to Spring Security.

@emmdurin emmdurin merged commit 6a3f274 into main Nov 3, 2023
@emmdurin emmdurin deleted the fix_whoami_when_idp_returns_null_claims branch November 3, 2023 07:47
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.

2 participants