BigW Consortium Gitlab

Commit 4f687aaa by Saito

Merge pull request #1827 from mgrobelin/master

grack auth bugfix: allow dots in reponame
parents 643ed9cb bd50a9f4
...@@ -18,7 +18,7 @@ Gitlab::Application.routes.draw do ...@@ -18,7 +18,7 @@ Gitlab::Application.routes.draw do
project_root: Gitlab.config.git_base_path, project_root: Gitlab.config.git_base_path,
upload_pack: Gitlab.config.git_upload_pack, upload_pack: Gitlab.config.git_upload_pack,
receive_pack: Gitlab.config.git_receive_pack receive_pack: Gitlab.config.git_receive_pack
}), at: '/:path', constraints: { path: /[\w-]+\.git/ } }), at: '/:path', constraints: { path: /[\w\.-]+\.git/ }
# #
# Help # Help
......
...@@ -18,7 +18,7 @@ module Grack ...@@ -18,7 +18,7 @@ module Grack
@env['SCRIPT_NAME'] = "" @env['SCRIPT_NAME'] = ""
# Find project by PATH_INFO from env # Find project by PATH_INFO from env
if m = /^\/([\w-]+).git/.match(@request.path_info).to_a if m = /^\/([\w\.-]+)\.git/.match(@request.path_info).to_a
self.project = Project.find_by_path(m.last) self.project = Project.find_by_path(m.last)
return false unless project return false unless project
end end
...@@ -65,7 +65,7 @@ module Grack ...@@ -65,7 +65,7 @@ module Grack
end end
# Need to reset seek point # Need to reset seek point
@request.body.rewind @request.body.rewind
/refs\/heads\/([\w-]+)/.match(input).to_a.first /refs\/heads\/([\w\.-]+)/.match(input).to_a.first
end end
protected protected
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment