aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-21 16:49:44 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-21 16:59:13 -0700
commitc0c726849bf697f6c76b86e704ca51b04e252341 (patch)
treef9bf0f1fb6bc1cbe546032770be3eb50de42a3fa
parentfbf6b98c95dfe5d066182feaed3f2c20c4e778c3 (diff)
downloadrails-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.
-rw-r--r--actionpack/lib/action_dispatch/http/headers.rb2
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