diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-04 10:16:27 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-04-04 11:10:00 -0700 |
commit | e3959970e1f669c6ecf79d645b5e4f9d7ed2a4ec (patch) | |
tree | e9d926ad900776df172b672bb27cf0cbc5bdecdc /actionpack/lib/action_controller/metal/cookies.rb | |
parent | ef84e691ffe7b43ce64e859f43b17128a405785a (diff) | |
download | rails-e3959970e1f669c6ecf79d645b5e4f9d7ed2a4ec.tar.gz rails-e3959970e1f669c6ecf79d645b5e4f9d7ed2a4ec.tar.bz2 rails-e3959970e1f669c6ecf79d645b5e4f9d7ed2a4ec.zip |
Fix signed cookies by explicitly passing config to the cookie jar
Diffstat (limited to 'actionpack/lib/action_controller/metal/cookies.rb')
-rw-r--r-- | actionpack/lib/action_controller/metal/cookies.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/cookies.rb b/actionpack/lib/action_controller/metal/cookies.rb index 75e5d40a63..4aaa705203 100644 --- a/actionpack/lib/action_controller/metal/cookies.rb +++ b/actionpack/lib/action_controller/metal/cookies.rb @@ -7,10 +7,11 @@ module ActionController #:nodoc: included do helper_method :cookies end - + private def cookies - request.cookie_jar + raise "You must set config.cookie_secret in your app's config" if config.secret.blank? + request.cookie_jar(:signing_secret => config.secret) end end end |