You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by bm...@apache.org on 2022/01/21 10:15:05 UTC

[shiro] 01/03: SHIRO-841 - NullPointerException from SessionsSecurityManager.start()

This is an automated email from the ASF dual-hosted git repository.

bmarwell pushed a commit to branch SHIRO-842_log4j_update
in repository https://gitbox.apache.org/repos/asf/shiro.git

commit 1eda556ddde4583b0ce09a2c0fc03abb410b4dfa
Author: zeroflag <am...@cloudera.com>
AuthorDate: Thu Nov 4 12:19:49 2021 +0100

    SHIRO-841 - NullPointerException from SessionsSecurityManager.start()
---
 core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java b/core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java
index 8271e4c..0515ba3 100644
--- a/core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java
+++ b/core/src/main/java/org/apache/shiro/mgt/SessionsSecurityManager.java
@@ -149,6 +149,9 @@ public abstract class SessionsSecurityManager extends AuthorizingSecurityManager
     }
 
     public Session start(SessionContext context) throws AuthorizationException {
+        if (sessionManager == null) {
+            throw new IllegalStateException("Session manager is destroyed");
+        }
         return this.sessionManager.start(context);
     }