do not fail on wrong basic authorization header

This commit is contained in:
Sebastian Sdorra
2012-02-11 16:41:06 +01:00
parent d4f100776a
commit 1b4b3315db

View File

@@ -124,13 +124,10 @@ public class BasicAuthenticationFilter extends HttpFilter
{
user = securityContext.getUser();
}
else if (Util.isNotEmpty(authentication))
else if (Util.isNotEmpty(authentication)
&& authentication.toUpperCase().startsWith(
AUTHORIZATION_BASIC_PREFIX))
{
if (!authentication.toUpperCase().startsWith(AUTHORIZATION_BASIC_PREFIX))
{
throw new ServletException("wrong basic header");
}
user = authenticate(request, response, securityContext, authentication);
}