diff options
author | Andrew White <andrew.white@unboxed.co> | 2017-03-15 16:47:21 +0000 |
---|---|---|
committer | Andrew White <andrew.white@unboxed.co> | 2017-03-15 16:51:51 +0000 |
commit | 886085d6431e4f42191028d05519789f67d32bf8 (patch) | |
tree | aef84a7418b87555d5d9aa4ab266b87177175e97 /actionpack/lib | |
parent | 85c2b7565f37351c3d6091eab2a4b966a2f1c8e5 (diff) | |
download | rails-886085d6431e4f42191028d05519789f67d32bf8.tar.gz rails-886085d6431e4f42191028d05519789f67d32bf8.tar.bz2 rails-886085d6431e4f42191028d05519789f67d32bf8.zip |
Remove unnecessary params munging
In 9b654d4 some params munging was added to ensure that they were
set whenever `recognize_path` would call either a proc or callable
constraint. Since we no longer mutate the environment hash within
the method it's now unnecessary and actually causes params to leak
between route matches before checking constraints.
Fixes #28398.
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index c4719f8a71..118dec2ad4 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -860,8 +860,7 @@ module ActionDispatch params[key] = URI.parser.unescape(value) end end - old_params = req.path_parameters - req.path_parameters = old_params.merge params + req.path_parameters = params app = route.app if app.matches?(req) && app.dispatcher? begin |