]> source.dussan.org Git - redmine.git/commitdiff
route: add revision requirement to repository raw action lost in 1.4-stable
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 27 Apr 2012 15:41:07 +0000 (15:41 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 27 Apr 2012 15:41:07 +0000 (15:41 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9545 e93f8b46-1217-0410-a6f0-8f06a7374b81

config/routes.rb

index de2a7c8ee4389eda5c8745c29824a3cd4bddac12..0f57008a25379e97358448717a725ede851be2f1 100644 (file)
@@ -259,7 +259,8 @@ ActionController::Routing::Routes.draw do |map|
       repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/diff.:format',
                                :action => 'diff'
       repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/raw/*path',
-                               :action => 'entry', :format => 'raw'
+                               :action => 'entry', :format => 'raw',
+                               :requirements => { :rev => /[a-z0-9\.\-_]+/ }
       repository_views.connect 'projects/:id/repository/:repository_id/revisions/:rev/:action/*path',
                                :requirements => { 
                                    :action => /(browse|show|entry|changes|annotate|diff)/,
@@ -290,7 +291,8 @@ ActionController::Routing::Routes.draw do |map|
       repository_views.connect 'projects/:id/repository/revisions/:rev/diff.:format',
                                :action => 'diff'
       repository_views.connect 'projects/:id/repository/revisions/:rev/raw/*path',
-                               :action => 'entry', :format => 'raw'
+                               :action => 'entry', :format => 'raw',
+                               :requirements => { :rev => /[a-z0-9\.\-_]+/ }
       repository_views.connect 'projects/:id/repository/revisions/:rev/:action/*path',
                                :requirements => { 
                                    :action => /(browse|show|entry|changes|annotate|diff)/,