diff --git a/src/main/java/org/owasp/webgoat/container/AjaxAuthenticationEntryPoint.java b/src/main/java/org/owasp/webgoat/container/AjaxAuthenticationEntryPoint.java index 67b0cf9..1992a0e 100644 --- a/src/main/java/org/owasp/webgoat/container/AjaxAuthenticationEntryPoint.java +++ b/src/main/java/org/owasp/webgoat/container/AjaxAuthenticationEntryPoint.java @@ -51,7 +51,7 @@ public AjaxAuthenticationEntryPoint(String loginFormUrl) { @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { if (request.getHeader("x-requested-with") != null) { - response.sendError(401, authException.getMessage()); + response.sendError(401); } else { super.commence(request, response, authException); }