Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMark Chao <mchao@gitlab.com>2019-02-18 06:51:56 +0300
committerMark Chao <mchao@gitlab.com>2019-02-19 09:02:16 +0300
commitdbcf037b9d608a3d17ff3f4f1c234b4f28f2de15 (patch)
tree42ec7284d65eb14d2b52803b37b3b9bd7bf1d7e4 /config
parent0d5bd8d733aa3be37daec2cf21cc1ef97caee631 (diff)
Fix git clone revealing private repo's presence
Ensure redirection to path with .git suffix regardless whether project exists or not.
Diffstat (limited to 'config')
-rw-r--r--config/routes/git_http.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/routes/git_http.rb b/config/routes/git_http.rb
index ec5c68f81df..a959d40881b 100644
--- a/config/routes/git_http.rb
+++ b/config/routes/git_http.rb
@@ -40,7 +40,7 @@ scope(path: '*namespace_id/:project_id',
# /info/refs?service=git-receive-pack, but nothing else.
#
git_http_handshake = lambda do |request|
- ::Constraints::ProjectUrlConstrainer.new.matches?(request) &&
+ ::Constraints::ProjectUrlConstrainer.new.matches?(request, existence_check: false) &&
(request.query_string.blank? ||
request.query_string.match(/\Aservice=git-(upload|receive)-pack\z/))
end