From c0c726849bf697f6c76b86e704ca51b04e252341 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 21 Aug 2015 16:49:44 -0700 Subject: dup the env hash on Header#env This prevents external mutations from impacting the internals of the request or the Header object. --- actionpack/lib/action_dispatch/http/headers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3