summaryrefslogtreecommitdiff
path: root/lib/gitlab/regex.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-13 16:13:40 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-13 16:13:40 +0200
commit64edb27aa95cef237564b2f6dad38ba6208f3745 (patch)
tree1c1812ea8c7594bf5f047afc88202f886574de5c /lib/gitlab/regex.rb
parent31239d116a873bd6110c3995821df66c9720663a (diff)
downloadgitlab-ce-64edb27aa95cef237564b2f6dad38ba6208f3745.tar.gz
Extend Gitlab#default_regex. Dont allow project path ends with .git
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r--lib/gitlab/regex.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index 55aa240a9f9..eb6b91e26b5 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -44,7 +44,7 @@ module Gitlab
protected
def default_regex
- /\A[a-zA-Z0-9][a-zA-Z0-9_\-\.]*\z/
+ /\A[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/
end
end
end