-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Yuriy Sazonets opened SPR-17051 and commented
DefaultWebSessionManager#save checks whether previously retrieved session is active (started) and not expired, but doesn't check if it actually exists in the session store.
Consider scenario:
- Long-running WebSocket request A.
- Logout during request A => session id gets changed.
- Request A ends and gets committed.
- DefaultWebSessionManager#save gets invoked with old session id (which is not valid anymore) and proceeds with saving.
- ReactiveRedisOperationsSessionRepository#save doesn't validate if the session passed in exists in the store, and just applies the delta (which in this case is only lastAccessedTime), which results in an broken session entry with only lastAccessedTime attribute.
- Subsequent requests to old session id fail because session data is inconsistent in the repository.
This causes major problems in production code. More details (and sample project to reproduce the issue) here: spring-projects/spring-session#1111
Affects: 5.0.7
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement