aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-09-06 18:01:53 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2015-09-08 20:27:05 +0200
commite05136ab41916a91add7d46f26cf119ff0dfaf34 (patch)
tree6c54cf67594ac64c76302261d20924eb251718d0 /actionpack
parentc9efdb582a81d84d5f4ee1f2e3123f59d68b00fe (diff)
downloadrails-e05136ab41916a91add7d46f26cf119ff0dfaf34.tar.gz
rails-e05136ab41916a91add7d46f26cf119ff0dfaf34.tar.bz2
rails-e05136ab41916a91add7d46f26cf119ff0dfaf34.zip
Pull up parse to the legacy upgrading module
It was the same in both legacy versions of the signed and encrypted cookie jars.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/cookies.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb
index 12c19d0098..b292efee5c 100644
--- a/actionpack/lib/action_dispatch/middleware/cookies.rb
+++ b/actionpack/lib/action_dispatch/middleware/cookies.rb
@@ -253,6 +253,11 @@ module ActionDispatch
rescue ActiveSupport::MessageVerifier::InvalidSignature
nil
end
+
+ private
+ def parse(name, signed_message)
+ super || verify_and_upgrade_legacy_signed_message(name, signed_message)
+ end
end
class CookieJar #:nodoc:
@@ -526,11 +531,6 @@ module ActionDispatch
# re-saves them using the new key generator to provide a smooth upgrade path.
class UpgradeLegacySignedCookieJar < SignedCookieJar #:nodoc:
include VerifyAndUpgradeLegacySignedMessage
-
- private
- def parse(name, signed_message)
- super || verify_and_upgrade_legacy_signed_message(name, signed_message)
- end
end
class EncryptedCookieJar < AbstractCookieJar # :nodoc:
@@ -569,11 +569,6 @@ module ActionDispatch
# encrypts and re-saves them using the new key generator to provide a smooth upgrade path.
class UpgradeLegacyEncryptedCookieJar < EncryptedCookieJar #:nodoc:
include VerifyAndUpgradeLegacySignedMessage
-
- private
- def parse(name, encrypted_or_signed_message)
- super || verify_and_upgrade_legacy_signed_message(name, encrypted_or_signed_message)
- end
end
def initialize(app)