Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to previous HttpSession references are not reflected after changeSessionId() invoked #227

Closed
tsachev opened this issue Jun 24, 2015 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@tsachev
Copy link
Contributor

tsachev commented Jun 24, 2015

When spring-session is used and HttpServletRequest#changeSessionId() is called previously obtained HTTP session instance is no longer usable.
For example following code works fine on tomcat, jetty and undertow, but doesn't when spring-session is used

HttpSession session = req.getSession();
req.changeSessionId();
session.setAttribute("attr", "value");

// ...

// expect attrValue to be "value" 
Object attrValue = req.getSession().getAttribute("attr");
@rwinch rwinch added this to the 1.1.0 M1 milestone Jun 25, 2015
@rwinch rwinch modified the milestones: 1.0.2, 1.1.0 M1 Jul 24, 2015
@rwinch rwinch added the type: bug A general bug label Jul 24, 2015
@rwinch rwinch closed this as completed in b799132 Jul 27, 2015
@rwinch
Copy link
Member

rwinch commented Jul 27, 2015

Thanks for the report! This was indeed an issue. I have fixed this in master and it will be available in the 1.0.2 release.

While I did test this myself, I'd appreciate you trying out the latest SNAPSHOT and ensuring that it resolved your issue. You can obtain the spring-session-1.0.2.BUILD-SNAPSHOT.jar from our maven repository:

<repository>
    <id>spring-snapshot</id>
    <url>https://repo.spring.io/libs-snapshot</url>
</repository>

@rwinch rwinch self-assigned this Jul 27, 2015
@rwinch rwinch changed the title obtained session instance is unusable after HttpServletRequest#changeSessionId() is called. Updates to previous HttpSession references are not reflected after changeSessionId() invoked Jul 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants