diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-28 00:29:43 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-11-28 00:29:43 +0000 |
commit | 45d679bcb881adf8782230ff3b14ebc3a8d20e7b (patch) | |
tree | b479d3242bc818fa69698573f93a6f97f8be9806 /actionpack/lib | |
parent | 4d177ae0d6d9f60c4000f45fb6f6df27317afbff (diff) | |
download | rails-45d679bcb881adf8782230ff3b14ebc3a8d20e7b.tar.gz rails-45d679bcb881adf8782230ff3b14ebc3a8d20e7b.tar.bz2 rails-45d679bcb881adf8782230ff3b14ebc3a8d20e7b.zip |
Added protection from trailing slashes on page caching (closes #10229) [devrieda]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index ce03a979f8..28426bd047 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -106,7 +106,7 @@ module ActionController #:nodoc: private def page_cache_file(path) - name = ((path.empty? || path == "/") ? "/index" : URI.unescape(path)) + name = (path.empty? || path == "/") ? "/index" : URI.unescape(path.chomp('/')) name << page_cache_extension unless (name.split('/').last || name).include? '.' return name end |