mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
fix wrong status codes with enabled anonymous access
This commit is contained in:
@@ -180,7 +180,7 @@ public class BasicAuthenticationFilter extends HttpFilter
|
||||
logger.trace("could not find user send unauthorized");
|
||||
}
|
||||
|
||||
HttpUtil.sendUnauthorized(request, response);
|
||||
handleUnauthorized(request, response, chain);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -115,6 +115,10 @@ public class SecurityFilter extends HttpFilter
|
||||
{
|
||||
response.sendError(HttpServletResponse.SC_FORBIDDEN);
|
||||
}
|
||||
else if (configuration.isAnonymousAccessEnabled())
|
||||
{
|
||||
response.sendError(HttpServletResponse.SC_FORBIDDEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
|
||||
|
||||
Reference in New Issue
Block a user