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) {