Explorar o código

Increase count check to 1

There's another way to disable a user anyways.
Joshua M. Boniface %!s(int64=4) %!d(string=hai) anos
pai
achega
d0ec6872f3
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Emby.Server.Implementations/Session/SessionManager.cs

+ 1 - 1
Emby.Server.Implementations/Session/SessionManager.cs

@@ -1487,7 +1487,7 @@ namespace Emby.Server.Implementations.Session
             var sessionsCount = Sessions.Where(i => string.Equals(i.UserId, user.Id)).ToList().Count;
             int maxActiveSessions = user.MaxActiveSessions;
             _logger.LogInformation("Current/Max sessions for user {User}: {Sessions}/{Max}", user.Username, sessionsCount, maxActiveSessions);
-            if (maxActiveSessions >= 0 && sessionsCount >= maxActiveSessions)
+            if (maxActiveSessions >= 1 && sessionsCount >= maxActiveSessions)
             {
                 throw new SecurityException("User is at their maximum number of sessions.");
             }