From a02821bc7467e99c04948d0cc2b8142bb7132fdd Mon Sep 17 00:00:00 2001 From: CaptainB Date: Sat, 3 Dec 2022 13:31:28 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E7=99=BB=E5=87=BA=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/service/SSOLogoutService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SSOLogoutService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SSOLogoutService.java index f37d768a88..1ac8725b02 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SSOLogoutService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/SSOLogoutService.java @@ -33,6 +33,9 @@ public class SSOLogoutService { */ public void logout(String sessionId, HttpServletResponse response) throws Exception { Object obj = redisIndexedSessionRepository.findById(sessionId); + if (obj == null) { + return; + } String authId = (String) MethodUtils.invokeMethod(obj, "getAttribute", "authId"); AuthSource authSource = authSourceMapper.selectByPrimaryKey(authId); if (authSource != null) {