SecurityEnforcementFilter caused NullPointerException when anonymous authentication used with BasicProcessingFilterEntryPoint.

This commit is contained in:
Ben Alex 2005-03-10 11:11:25 +00:00
parent 08dbf66880
commit 15535fff41
2 changed files with 5 additions and 2 deletions

View File

@ -19,6 +19,7 @@ import net.sf.acegisecurity.AccessDeniedException;
import net.sf.acegisecurity.AuthenticationException;
import net.sf.acegisecurity.AuthenticationTrustResolver;
import net.sf.acegisecurity.AuthenticationTrustResolverImpl;
import net.sf.acegisecurity.InsufficientAuthenticationException;
import net.sf.acegisecurity.context.security.SecureContextUtils;
import net.sf.acegisecurity.ui.AbstractProcessingFilter;
import net.sf.acegisecurity.util.PortResolver;
@ -198,7 +199,9 @@ public class SecurityEnforcementFilter implements Filter, InitializingBean {
accessDenied);
}
sendStartAuthentication(fi, null);
sendStartAuthentication(fi,
new InsufficientAuthenticationException(
"Full authentication is required to access this resource"));
} else {
if (logger.isDebugEnabled()) {
logger.debug("Access is denied (user is not anonymous); sending back forbidden response",

View File

@ -26,7 +26,7 @@
</properties>
<body>
<release version="0.8.1" date="In CVS">
<action dev="benalex" type="add">...</action>
<action dev="benalex" type="fix">SecurityEnforcementFilter caused NullPointerException when anonymous authentication used with BasicProcessingFilterEntryPoint</action>
</release>
<release version="0.8.0" date="2005-03-03">
<action dev="benalex" type="add">Added Digest Authentication support (RFC 2617 and RFC 2069)</action>