aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-03-21 22:44:04 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2008-03-21 22:44:04 +0000
commitf2840f508da1e69450551d3e3404cd72a77427e3 (patch)
tree03631560b78a7bfd32af4416850dfad5424baff4 /actionpack/lib/action_controller
parentc23c9bd11bc16618a1765eb61424014912a6e1d7 (diff)
downloadrails-f2840f508da1e69450551d3e3404cd72a77427e3.tar.gz
rails-f2840f508da1e69450551d3e3404cd72a77427e3.tar.bz2
rails-f2840f508da1e69450551d3e3404cd72a77427e3.zip
Fix an edge case with extra periods in Routing.normalize_paths. Closes #11337 [cavalle, veejar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9069 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/routing.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index 70745f9d27..4cc5647cd9 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -272,8 +272,8 @@ module ActionController
gsub(%r{(.)[\\/]$}, '\1') # drop final / or \ if path ends with it
# eliminate .. paths where possible
- re = %r{\w+[/\\]\.\.[/\\]}
- path.gsub!(%r{\w+[/\\]\.\.[/\\]}, "") while path.match(re)
+ re = %r{[^/\\]+[/\\]\.\.[/\\]}
+ path.gsub!(re, "") while path.match(re)
path
end