project path & code regexp validation

This commit is contained in:
gitlabhq 2011-10-15 19:30:56 +03:00
parent 29158ea38c
commit 57baa49bc3
5 changed files with 9 additions and 10 deletions

View file

@ -32,7 +32,7 @@ Gitlab::Application.routes.draw do
get "tree/:commit_id/:path" => "projects#tree",
:as => :tree_file,
:constraints => {
:id => /[a-zA-Z0-9]+/,
:id => /[a-zA-Z0-9_\-]+/,
:commit_id => /[a-zA-Z0-9]+/,
:path => /.*/
}