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 08:59:24 +0300
commit9d046c8704c0e7df18d2f9e380e987d22b9a0b2e (patch)
tree7f5f53fba0bc7f3a09458fd04acb64d4ad91a29b /config
parent701303a5dba78a217d8050316b0c6ea2f2c4c519 (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