diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-08-23 18:16:15 +0200 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-08-23 18:16:15 +0200 |
commit | 0ae0b3a5b43c8b89b5925a7d39cc6459315429ef (patch) | |
tree | 2124c5f83d38af590e8821af0ef627a3fd2d0374 /actionpack/lib | |
parent | 093e6ae74b80157c3d328adf09e770ec2154408d (diff) | |
parent | 688bcc8e5b80f5281cbdbc512ee79b54f5519182 (diff) | |
download | rails-0ae0b3a5b43c8b89b5925a7d39cc6459315429ef.tar.gz rails-0ae0b3a5b43c8b89b5925a7d39cc6459315429ef.tar.bz2 rails-0ae0b3a5b43c8b89b5925a7d39cc6459315429ef.zip |
Merge pull request #21340 from ronakjangir47/request_object
Another place to use a request object in NullSessionHash
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/metal/request_forgery_protection.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/request_forgery_protection.rb b/actionpack/lib/action_controller/metal/request_forgery_protection.rb index d21a778d8d..e5f3cb8e8d 100644 --- a/actionpack/lib/action_controller/metal/request_forgery_protection.rb +++ b/actionpack/lib/action_controller/metal/request_forgery_protection.rb @@ -136,7 +136,7 @@ module ActionController #:nodoc: # This is the method that defines the application behavior when a request is found to be unverified. def handle_unverified_request request = @controller.request - request.session = NullSessionHash.new(request.env) + request.session = NullSessionHash.new(request) request.env['action_dispatch.request.flash_hash'] = nil request.env['rack.session.options'] = { skip: true } request.cookie_jar = NullCookieJar.build(request, {}) @@ -145,8 +145,8 @@ module ActionController #:nodoc: protected class NullSessionHash < Rack::Session::Abstract::SessionHash #:nodoc: - def initialize(env) - super(nil, env) + def initialize(req) + super(nil, req) @data = {} @loaded = true end |