spring-projects / spring-projects/spring-session
invalidate does not work on session objects handed out to HttpSessionListener
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
Using Spring Session 1.3.0
If a HttpSessionListener is added, it correctly gets events sent to it by the Spring Session SessionEventHttpSessionListenerAdapter.
However, if the listener then calls invalidate() on the session object received, then nothing happens.
The code in SessionEventHttpSessionListenerAdapter.createHttpSessionEvent looks fishy, it just does a new ExpiringSessionHttpSession, that object is in no way connected to the rest of Spring Session.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at SessionEventHttpSessionListenerAdapter.createHttpSessionEvent and inspect how the new ExpiringSessionHttpSession is connected to the underlying Spring Session. Reproduce a listener calling invalidate() on the received session; done means invalidation affects the corresponding Spring Session rather than doing nothing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100