SEC-266: Handle -1 allowing unlimited logins, as per JavaDocs.
This commit is contained in:
parent
501eaadd09
commit
d795836bf1
|
@ -121,6 +121,10 @@ public class ConcurrentSessionControllerImpl
|
||||||
"getMaximumSessionsForThisUser() must return either -1 to allow unlimited logins, or a positive integer to specify a maximum");
|
"getMaximumSessionsForThisUser() must return either -1 to allow unlimited logins, or a positive integer to specify a maximum");
|
||||||
|
|
||||||
if (sessionCount < allowableSessions) {
|
if (sessionCount < allowableSessions) {
|
||||||
|
// They haven't got too many login sessions running at present
|
||||||
|
return;
|
||||||
|
} else if (allowableSessions == -1) {
|
||||||
|
// We permit unlimited logins
|
||||||
return;
|
return;
|
||||||
} else if (sessionCount == allowableSessions) {
|
} else if (sessionCount == allowableSessions) {
|
||||||
// Only permit it though if this request is associated with one of the sessions
|
// Only permit it though if this request is associated with one of the sessions
|
||||||
|
|
Loading…
Reference in New Issue