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

SEC-143: NPE in JaasAuthenticationProvider #404

Closed
spring-projects-issues opened this issue Jan 12, 2006 · 3 comments
Closed

SEC-143: NPE in JaasAuthenticationProvider #404

spring-projects-issues opened this issue Jan 12, 2006 · 3 comments
Labels
in: core An issue in spring-security-core type: bug A general bug type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

Eric Hedström(Migrated from SEC-143) said:

Servlet containers often destroy sessions before an Acegi SecurityContext has been attached to them. This ends up causing a NullPointerException in JaasAuthenticationProvider.handleLogout() line 424.

java.lang.NullPointerException
at net.sf.acegisecurity.providers.jaas.JaasAuthenticationProvider.handleLogout(JaasAuthenticationProvider.java:424)
at net.sf.acegisecurity.providers.jaas.JaasAuthenticationProvider.onApplicationEvent(JaasAuthenticationProvider.java:413)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:45)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:224)
at net.sf.acegisecurity.ui.session.HttpSessionEventPublisher.sessionDestroyed(HttpSessionEventPublisher.java:107)
at com.ibm.ws.webcontainer.httpsession.SessionContext.sessionDestroyedEvent(SessionContext.java:3417)
…..

@spring-projects-issues
Copy link
Author

Eric Hedström said:

Can’t connect to CVS to create a patch file, but one approach would be to replace line 424 with these:

```
Authentication auth = null;
if (context != null) {
auth = context.getAuthentication();
}
```

@spring-projects-issues
Copy link
Author

Ray Krueger said:

Fixed

@spring-projects-issues spring-projects-issues added in: core An issue in spring-security-core Closed type: bug A general bug type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@spring-projects-issues spring-projects-issues added this to the 1.0.0 RC2 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: bug A general bug type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

2 participants
@spring-projects-issues and others