spring-projects / spring-projects/spring-security
SEC-2753: NullPointerException in AccountStatusUserDetailsChecker
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Gar Greenberg (Migrated from SEC-2753) said:
When user was successfully authenticated in LDAP but did not have permissions to access the software an NPE occurs:
java.lang.NullPointerException
org.springframework.security.authentication.AccountStatusUserDetailsChecker.check(AccountStatusUserDetailsChecker.java:16)
org.springframework.security.cas.authentication.CasAuthenticationProvider.authenticateNow(CasAuthenticationProvider.java:133)
org.springframework.security.cas.authentication.CasAuthenticationProvider.authenticate(CasAuthenticationProvider.java:117)
com.rhd.ams.security.cas.ams.CasBasicAuthenticationProvider.authenticate(CasBasicAuthenticationProvider.java:56)
org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
com.rhd.ams.security.cas.ams.CustomBasicAuthenticationFilter.doFilter(CustomBasicAuthenticationFilter.java:172)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AccountStatusUserDetailsChecker.java at line 16 and trace how CasAuthenticationProvider.authenticateNow reaches it after successful LDAP authentication. Reproduce the case where the user lacks permissions, then determine the expected authentication outcome and verify that the NPE no longer occurs through the reported authentication path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, backend, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100