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 NPE when nameAttributeValue is null (#15338) #15407

Merged

Conversation

HyoJongPark
Copy link
Contributor

This commit resolves NPEs that occur in DefaultOuth2User#getName.
If the attributes have a key, but the value comes in null, the NPE occurs, and we modified the case and added a related test case.

fixes: #15338

@pivotal-cla
Copy link

@HyoJongPark Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@HyoJongPark Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 12, 2024
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

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

Thanks! I've left some feedback inline.

Also, when you are ready, will you please squash your commits so that there is only one? Please format that final commit like so:

Check for null Name Attribute Value

Closes gh-15338

@jzheaux jzheaux added type: bug A general bug in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 12, 2024
@jzheaux jzheaux self-assigned this Jul 12, 2024
@HyoJongPark HyoJongPark force-pushed the fix-attributes-null-value-check branch from b2a7040 to d991019 Compare July 12, 2024 23:00
@HyoJongPark
Copy link
Contributor Author

All review has been resolved and reformat commit.!

@HyoJongPark HyoJongPark requested a review from jzheaux July 16, 2024 07:49
@jzheaux jzheaux merged commit df76537 into spring-projects:main Jul 18, 2024
4 checks passed
@jzheaux
Copy link
Contributor

jzheaux commented Jul 18, 2024

Thanks, @HyoJongPark! This is now merged into main.

@jzheaux jzheaux added this to the 6.4.0-M2 milestone Jul 18, 2024
@jzheaux jzheaux added type: enhancement A general enhancement and removed type: bug A general bug labels Jul 18, 2024
@HyoJongPark HyoJongPark deleted the fix-attributes-null-value-check branch July 19, 2024 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPE in DefaultOAuth2User.getName function
4 participants