Browse Source

SEC-543: sessionsUsedByPrincipal only needs to be added to "principals" map when it is first created.

2.0.x
Luke Taylor 18 years ago
parent
commit
e37d0b0bb1
  1. 7
      core/src/main/java/org/springframework/security/concurrent/SessionRegistryImpl.java

7
core/src/main/java/org/springframework/security/concurrent/SessionRegistryImpl.java

@ -132,12 +132,11 @@ public class SessionRegistryImpl implements SessionRegistry, ApplicationListener @@ -132,12 +132,11 @@ public class SessionRegistryImpl implements SessionRegistry, ApplicationListener
Set sessionsUsedByPrincipal = (Set) principals.get(principal);
if (sessionsUsedByPrincipal == null) {
sessionsUsedByPrincipal = Collections.synchronizedSet(new HashSet());
}
sessionsUsedByPrincipal = Collections.synchronizedSet(new HashSet(4));
principals.put(principal, sessionsUsedByPrincipal);
}
sessionsUsedByPrincipal.add(sessionId);
principals.put(principal, sessionsUsedByPrincipal);
}
public void removeSessionInformation(String sessionId) {

Loading…
Cancel
Save