mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Pull up parse to the legacy upgrading module
It was the same in both legacy versions of the signed and encrypted cookie jars.
This commit is contained in:
parent
c9efdb582a
commit
e05136ab41
1 changed files with 5 additions and 10 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue