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

Switch to JSON format for cookie serialisation #1144

Open
chrislo opened this issue May 24, 2017 · 0 comments
Open

Switch to JSON format for cookie serialisation #1144

chrislo opened this issue May 24, 2017 · 0 comments
Milestone

Comments

@chrislo
Copy link
Contributor

chrislo commented May 24, 2017

We are currently using the marshal serializer to store cookies. When we upgrade to rails 5 the default will switch to json. We can first use the hybrid 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

@chrislo chrislo added this to the Standardize milestone May 24, 2017
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant