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

Encrypted cookies #30

Open
tombruijn opened this issue Apr 17, 2017 · 0 comments
Open

Encrypted cookies #30

tombruijn opened this issue Apr 17, 2017 · 0 comments

Comments

@tombruijn
Copy link
Collaborator

Save the session id encrypted in a cookie. This makes it difficult for potential hackers to modify cookie contents. They will still be able to see how the session id is generated in the gem's source code, but can't guess the sequence because the session id is encrypted.

We can use encrypted cookies as Rails does by adding the logic from the Rails encrypted CookieStore.

This uses the secret_token and secret_key_base values as saved in config/initializers/secret_token.rb for encryption.

This adds quite a bit more code to the code base and requires additional testing of course. I would copy most of the tests from the Rails test suite.


Whoever wants to pick this up is free to do so :)

Extracted from #23

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

No branches or pull requests

1 participant