Initial update of cookies/cookie_store to permit changing secret keys#18772
Closed
djmally wants to merge 4 commits intorails:masterfrom
Closed
Initial update of cookies/cookie_store to permit changing secret keys#18772djmally wants to merge 4 commits intorails:masterfrom
djmally wants to merge 4 commits intorails:masterfrom
Conversation
Member
|
cc @jeremy |
claudiob
added a commit
that referenced
this pull request
Feb 11, 2015
PR #18772 changed the parameters of `stale?` to use `kwargs`. [As for this comment](https://github.com/rails/rails/pull/18872/files#r24456288) the default value for the `etag` parameter should be `record`, not `nil`. This commit fixes the code and introduces a test that: - passed before #18872 - fails on the current master (after #18772) - passes again after setting the default value of `etag` to `record`.
Member
There was a problem hiding this comment.
@djmally can you remove this extra line after the end. Thanks!
Contributor
|
Is this still relevant? Otherwise, it's stale and should be closed. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cookiesandcookie_store(should) now support changing secret keys without invalidating all cookies made with an old key. When anEncryptedCookieJaris created, it initializes a list of(secret_key, sign_secret)pairs, which is updated whenever the key is changed. Decrypting a cookie is achieved by checking the result of decrypting with every key stored, and validating the cookie if any of the decryptions do not fail.