-
Notifications
You must be signed in to change notification settings - Fork 16
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
Switch to JSON format for cookie serialisation #1144
Milestone
Comments
chrislo
added a commit
that referenced
this issue
May 24, 2017
We ran `rake app:update`, inspected the changes and incorporated those that made sense. In the case of `Rails.application.config.action_dispatch.cookies_serializer` we were previously using the default `:marshal` serializer. With rails 5 the default has changed to `:json`. In our case we cannot accept this default as there are still valid cookies stored on client machines in the `:marshal` format. We therefore use the `:hybrid` format which will migrate the cookies to the new format when the users log in[1]. At some point in the future we should be able to switch to the `:json` format. I've added #1144 to track this. [1] http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#cookies-serializer
chrislo
added a commit
that referenced
this issue
May 24, 2017
We ran `rake app:update`, inspected the changes and incorporated those that made sense. In the case of `Rails.application.config.action_dispatch.cookies_serializer` we were previously using the default `:marshal` serializer. With rails 5 the default has changed to `:json`. In our case we cannot accept this default as there are still valid cookies stored on client machines in the `:marshal` format. We therefore use the `:hybrid` format which will migrate the cookies to the new format when the users log in[1]. At some point in the future we should be able to switch to the `:json` format. I've added #1144 to track this. [1] http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#cookies-serializer
chrislo
added a commit
that referenced
this issue
May 24, 2017
We ran `rake app:update`, inspected the changes and incorporated those that made sense. In the case of `Rails.application.config.action_dispatch.cookies_serializer` we were previously using the default `:marshal` serializer. With rails 5 the default has changed to `:json`. In our case we cannot accept this default as there are still valid cookies stored on client machines in the `:marshal` format. We therefore use the `:hybrid` format which will migrate the cookies to the new format when the users log in[1]. At some point in the future we should be able to switch to the `:json` format. I've added #1144 to track this. [1] http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#cookies-serializer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are currently using the
marshal
serializer to store cookies. When we upgrade to rails 5 the default will switch tojson
. We can first use thehybrid
serialiser to ease the transition and ensure that users' cookies can still be read by our application[1].[1] http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#cookies-serializer
The text was updated successfully, but these errors were encountered: