Skip to content

Commit 1710f32

Browse files
committed
SEC-2011: Moved SessionRegistry documentation of SessionRegistry#onAuthentication
Previously the documentation was referring to what ConcurrentSessionControlStrategy performed. Now the documentation has been moved to the ConcurrentSessionControlStrategy#onAuthentication method.
1 parent b868daa commit 1710f32

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

web/src/main/java/org/springframework/security/web/authentication/session/ConcurrentSessionControlStrategy.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public ConcurrentSessionControlStrategy(SessionRegistry sessionRegistry) {
5454
this.sessionRegistry = sessionRegistry;
5555
}
5656

57+
/**
58+
* In addition to the steps from the superclass, the sessionRegistry will be updated with the new session information.
59+
*/
5760
@Override
5861
public void onAuthentication(Authentication authentication, HttpServletRequest request,
5962
HttpServletResponse response) {

web/src/main/java/org/springframework/security/web/authentication/session/SessionFixationProtectionStrategy.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ public class SessionFixationProtectionStrategy implements SessionAuthenticationS
6262
* <p>
6363
* If a session already exists, and matches the session Id from the client, a new session will be created, and the
6464
* session attributes copied to it (if {@code migrateSessionAttributes} is set).
65-
* The sessionRegistry will be updated with the new session information. If the client's requested session Id is
66-
* invalid, nothing will be done, since there is no need to change the session Id if it doesn't match the current
67-
* session.
65+
* If the client's requested session Id is invalid, nothing will be done, since there is no need to change the
66+
* session Id if it doesn't match the current session.
6867
* <p>
6968
* If there is no session, no action is taken unless the {@code alwaysCreateSession} property is set, in which
7069
* case a session will be created if one doesn't already exist.

0 commit comments

Comments
 (0)