From e192c729e663530fa1802a78d52bd8edf09f3050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B7=E5=86=B7?= Date: Wed, 13 May 2020 16:07:53 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Fixing=20a=20bug.=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA=E4=B9=B1?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../security/handler/FormAuthenticationFailureHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/FormAuthenticationFailureHandler.java b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/FormAuthenticationFailureHandler.java index ea54c444f..fefb2e412 100644 --- a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/FormAuthenticationFailureHandler.java +++ b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/FormAuthenticationFailureHandler.java @@ -47,7 +47,7 @@ public class FormAuthenticationFailureHandler implements AuthenticationFailureHa @SneakyThrows public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) { log.debug("表单登录失败:{}", exception.getLocalizedMessage()); - WebUtils.getResponse().sendRedirect(String.format("/token/login?error=%s" - , HttpUtil.encodeParams(exception.getMessage(), Charset.defaultCharset()))); + String url = HttpUtil.encodeParams(String.format("/token/login?error=%s", exception.getMessage()), Charset.defaultCharset()); + WebUtils.getResponse().sendRedirect(url); } } \ No newline at end of file