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

Session cookie not cleared if logout route is not at the root level #8

Open
Technius opened this issue Apr 2, 2017 · 3 comments
Open

Comments

@Technius
Copy link

Technius commented Apr 2, 2017

With SignedCookieBackend, session().clear() doesn't clear cookies if it is called on a route that isn't at the server root (e.g. /path/logout). This problem doesn't happen if Path=/ is added to the Set-Cookie header. I've confirmed this with both Firefox 45 and Chrome 57. I haven't tested this with the RedisBackend.

A minimal demonstration and a workaround can be found in this gist.

The dependencies that I used are

  • iron 0.5.1
  • mount 0.3.0
  • router 0.5.1
  • iron-sessionstorage 0.6.6

Edit: Looks like the issue is caused by this line. It seems like since Path is set when the cookie is created, cookie.clear does not remove the cookie.

untitaker added a commit that referenced this issue Apr 4, 2017
@untitaker
Copy link
Member

Thanks, please check whether #9 fixes your problem.

@Technius
Copy link
Author

Technius commented Apr 5, 2017

@untitaker It doesn't work; it could be a bug with cookie 0.5.0. Maybe the fix would be to upgradecookie.

@untitaker
Copy link
Member

untitaker commented Apr 6, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants