diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-21 16:49:44 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-21 16:59:13 -0700 |
commit | c0c726849bf697f6c76b86e704ca51b04e252341 (patch) | |
tree | f9bf0f1fb6bc1cbe546032770be3eb50de42a3fa /actionpack | |
parent | fbf6b98c95dfe5d066182feaed3f2c20c4e778c3 (diff) | |
download | rails-c0c726849bf697f6c76b86e704ca51b04e252341.tar.gz rails-c0c726849bf697f6c76b86e704ca51b04e252341.tar.bz2 rails-c0c726849bf697f6c76b86e704ca51b04e252341.zip |
dup the env hash on Header#env
This prevents external mutations from impacting the internals of the
request or the Header object.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/http/headers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/http/headers.rb b/actionpack/lib/action_dispatch/http/headers.rb index 8e238963c8..b70fee4a84 100644 --- a/actionpack/lib/action_dispatch/http/headers.rb +++ b/actionpack/lib/action_dispatch/http/headers.rb @@ -86,7 +86,7 @@ module ActionDispatch end end - def env; @req.env; end + def env; @req.env.dup; end private |