mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +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");
|
logger.trace("could not find user send unauthorized");
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpUtil.sendUnauthorized(request, response);
|
handleUnauthorized(request, response, chain);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -115,6 +115,10 @@ public class SecurityFilter extends HttpFilter
|
|||||||
{
|
{
|
||||||
response.sendError(HttpServletResponse.SC_FORBIDDEN);
|
response.sendError(HttpServletResponse.SC_FORBIDDEN);
|
||||||
}
|
}
|
||||||
|
else if (configuration.isAnonymousAccessEnabled())
|
||||||
|
{
|
||||||
|
response.sendError(HttpServletResponse.SC_FORBIDDEN);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
|
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
|
||||||
|
|||||||
Reference in New Issue
Block a user