From bf9a4358b824041febd883a3c20941e0a8db402b Mon Sep 17 00:00:00 2001 From: Ludy87 Date: Sat, 5 Apr 2025 17:30:09 +0200 Subject: [PATCH] Update CustomHttpSessionListener.java --- .../session/CustomHttpSessionListener.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/config/security/session/CustomHttpSessionListener.java b/src/main/java/stirling/software/SPDF/config/security/session/CustomHttpSessionListener.java index c93bb0a32..7e9fb1e38 100644 --- a/src/main/java/stirling/software/SPDF/config/security/session/CustomHttpSessionListener.java +++ b/src/main/java/stirling/software/SPDF/config/security/session/CustomHttpSessionListener.java @@ -237,16 +237,22 @@ public class CustomHttpSessionListener implements HttpSessionListener, SessionsI // Get the maximum number of application sessions @Override public int getMaxApplicationSessions() { - return getMaxUsers() * getMaxUserSessions(); + if (runningEE) { + return getMaxUsers() * getMaxUserSessions(); + } + return Integer.MAX_VALUE; } // Get the maximum number of user sessions @Override public int getMaxUserSessions() { if (loginEnabled) { - return 3; + if (runningEE) { + return 3; + } + return Integer.MAX_VALUE; // (3) } - return 10; + return Integer.MAX_VALUE; // (10) } // Get the maximum number of user sessions @@ -259,8 +265,8 @@ public class CustomHttpSessionListener implements HttpSessionListener, SessionsI return maxUsers; } } - return 50; + return Integer.MAX_VALUE; // (50) } - return 1; + return Integer.MAX_VALUE; // (1) } }