提交 3162c732 编写于 作者: 卓广飞 提交者: Gitee

🐛 fix a bug #I1H24Z 统一登录错误信息乱码

上级 7dc9dc01
...@@ -47,7 +47,7 @@ public class FormAuthenticationFailureHandler implements AuthenticationFailureHa ...@@ -47,7 +47,7 @@ public class FormAuthenticationFailureHandler implements AuthenticationFailureHa
@SneakyThrows @SneakyThrows
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) { public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) {
log.debug("表单登录失败:{}", exception.getLocalizedMessage()); log.debug("表单登录失败:{}", exception.getLocalizedMessage());
response.sendRedirect(String.format("/token/login?error=%s" String url = HttpUtil.encodeParams(String.format("/token/login?error=%s", exception.getMessage()), Charset.defaultCharset());
, HttpUtil.encodeParams(exception.getMessage(), Charset.defaultCharset()))); WebUtils.getResponse().sendRedirect(url);
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册