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

CookieHttpSessionStrategy can write the same Session id twice #251

Closed
rwinch opened this issue Jul 27, 2015 · 0 comments
Closed

CookieHttpSessionStrategy can write the same Session id twice #251

rwinch opened this issue Jul 27, 2015 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@rwinch
Copy link
Member

rwinch commented Jul 27, 2015

If SessionRepositoryRequestWrapper.commitSession() is invoked twice when a new session is created, then CookieHttpSessionStrategy will add the same cookie twice. A couple examples of how this could happen:

  • The response is committed and SessionRepositoryResponseWrapper.onResponseCommitted() invokes SessionRepositoryRequestWrapper.commitSession(). Then the finally block in SessionRepositoryFilter invokes SessionRepositoryRequestWrapper.commitSession() again.
  • The new session is initialized and an Exception is thrown (i.e. ERROR dispatch can cause two sessions to be created #229). The SessionRepositoryFilter invokes SessionRepositoryRequestWrapper.commitSession() in the REQUEST dispatch. Then in the ERROR dispatch SessionRepositoryFilter invokes SessionRepositoryRequestWrapper.commitSession() invokes it again.
@rwinch rwinch added the type: bug A general bug label Jul 27, 2015
@rwinch rwinch self-assigned this Jul 27, 2015
@rwinch rwinch added this to the 1.0.2 milestone Jul 27, 2015
@rwinch rwinch changed the title CookieHttpSessionStrategy can write the same Cookie twice CookieHttpSessionStrategy can write the same Session id twice Jul 28, 2015
@rwinch rwinch closed this as completed in d5484e1 Jul 28, 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

1 participant