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 cookies are too large when chunked #282

Closed
steff-o opened this issue Sep 28, 2021 · 2 comments
Closed

Session cookies are too large when chunked #282

steff-o opened this issue Sep 28, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@steff-o
Copy link

steff-o commented Sep 28, 2021

Describe the problem

If the session cookie is too large and has to be chunked and If the setting for session.cookie.path is not set , the chunks are created too large. This results in the browser refusing to set the cookie, and the session is dropped which results in and 'endless' redirect loop.

Most likely this is due to the calculation of empty cookie length, that does not take into consideration that the final cookie will include additional cookie header values.

What was the expected behavior?

The session would be split into several chunks and reassembled again and the login would work.

Reproduction

  • Step 1 Create a minimal application, nothing fancy
  • Step 2 Configure response_type: 'code' That would probably create a big enough session (mine gets around 6k)
  • Step 3 Do not configure a cookie path setting

Environment

  • Version of this library used: 2.5.0
  • Which framework are you using, if applicable:
  • Other modules/plugins/libraries that might be involved:
  • Any other relevant information you think would be useful:
@adamjmcgrath
Copy link
Contributor

Hi @steff-o - this was fixed in #275

I just didn't get round to releasing the fix yet - I'll do that shortly and update this thread

@adamjmcgrath adamjmcgrath added the bug Something isn't working label Sep 28, 2021
@adamjmcgrath
Copy link
Contributor

Released in https://github.com/auth0/express-openid-connect/releases/tag/v2.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants