Skip to content

0.57.0 seems to break cookie sessions? #96

@travisbell

Description

@travisbell

Hey @ioquatix,

Happy new year. 😄

After updating to 0.57.0 sessions in our app broke. The error I see in our logs is:

Warning! Rack::Session::Cookie data size exceeds 4K.
Warning! Rack::Session::Cookie failed to save session. Content dropped.

Which is really weird because the content of the session cookie is only ~550 bytes, so I can't quite make sense of why that error is being returned.

☝🏼 I am not 100% convinced these are connected, actually. It might be, but it might also just be some users messing about with the cookies and sessions as they like to do...

Regardless, restoring 0.56.1 gets things working again.

We're setting up our session like so:

use Rack::Session::Cookie,
  coder: JwtSessionEncoder.new,
  expire_after: 1209600,
  httponly: true,
  key: "session",
  let_coder_handle_secure_encoding: true,
  path: "/",
  same_site: :lax,
  secure: true

Let me know if you need anything else to make sense of it, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions