فهرست منبع

Added NPE check for defaultTargetUrl in requiresAuthentication

Scott McCrory 19 سال پیش
والد
کامیت
481a9377e4
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      core/src/main/java/org/acegisecurity/ui/webapp/SiteminderAuthenticationProcessingFilter.java

+ 3 - 2
core/src/main/java/org/acegisecurity/ui/webapp/SiteminderAuthenticationProcessingFilter.java

@@ -246,10 +246,11 @@ public class SiteminderAuthenticationProcessingFilter
 			}
 		}
 		
-		//if true is returned then authentication will be attempted. 
+		// if true is returned then authentication will be attempted.
 		boolean bAttemptAuthentication = (uri.endsWith(request.getContextPath()
 				+ getFilterProcessesUrl()))
-				|| ((uri.endsWith(getDefaultTargetUrl()) && !bAuthenticated));
+				|| ((getDefaultTargetUrl() != null
+						&& uri.endsWith(getDefaultTargetUrl()) && !bAuthenticated));
 		
 		if (logger.isDebugEnabled()) {
 			logger.debug("Authentication attempted for the following URI ==> "