diff options
author | Mark Chao <mchao@gitlab.com> | 2019-02-18 11:51:56 +0800 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2019-02-19 13:59:24 +0800 |
commit | 9d046c8704c0e7df18d2f9e380e987d22b9a0b2e (patch) | |
tree | 7f5f53fba0bc7f3a09458fd04acb64d4ad91a29b /config | |
parent | 701303a5dba78a217d8050316b0c6ea2f2c4c519 (diff) | |
download | gitlab-ce-9d046c8704c0e7df18d2f9e380e987d22b9a0b2e.tar.gz |
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.rb | 2 |
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 |