diff options
-rw-r--r-- | actionpack/lib/action_controller/metal/request_forgery_protection.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/cookies.rb | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index e4246c46b7..b5e1a7ac1e 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -161,11 +161,10 @@ module ActionController #:nodoc: class NullCookieJar < ActionDispatch::Cookies::CookieJar #:nodoc: def self.build(request) - key_generator = request.key_generator host = request.host secure = request.ssl? - new(key_generator, host, secure, request) + new(host, secure, request) end def write(*) diff --git a/actionpack/lib/action_dispatch/middleware/cookies.rb b/actionpack/lib/action_dispatch/middleware/cookies.rb index 62471f9ba4..fbcff3cd94 100644 --- a/actionpack/lib/action_dispatch/middleware/cookies.rb +++ b/actionpack/lib/action_dispatch/middleware/cookies.rb @@ -259,15 +259,14 @@ module ActionDispatch DOMAIN_REGEXP = /[^.]*\.([^.]*|..\...|...\...)$/ def self.build(req, cookies) - key_generator = req.key_generator host = req.host secure = req.ssl? - new(key_generator, host, secure, req).tap do |hash| + new(host, secure, req).tap do |hash| hash.update(cookies) end end - def initialize(key_generator, host = nil, secure = false, request) + def initialize(host = nil, secure = false, request) @set_cookies = {} @delete_cookies = {} @host = host |