spring-projects / spring-projects/spring-session

Mutable rich session objects don't work with session's saveDelta()

Open
#177 11 comments 0 reactions 1 assignee View on GitHub

@rwinch is already working on this.

Since Apr 15, 2015.

status: waiting-for-triage
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

When a mutable object is referenced in a fetched session, and that object is modified, the attribute is never put into the delta list for saving to redis.

This was observed using spring-session with spring-security-oauth2, specifically with org.springframework.security.oauth2.provider.endpoint.AuthorizationEndpoint and it's @SessionAttrtibutes("authorizationRequest") annotation. While the authorizationRequest object (map in this case) is modified, the attribute "authorizationRequest" is not entered into the delta. On a subsequent POST, the request is unauthorized because the authorizationRequest map is not up to date in the session.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.