diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 06:07:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 06:07:50 +0000 |
commit | 92077e0f8d70c70a908395808b16f98ecd3a5fcd (patch) | |
tree | efb011b2b7e96c2a8a0e7877c0966ab70014ebee /app/controllers | |
parent | 83a3209c3f8e5bc055acf80f3440335d2b97133b (diff) | |
download | gitlab-ce-92077e0f8d70c70a908395808b16f98ecd3a5fcd.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/repositories/git_http_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/repositories/git_http_controller.rb b/app/controllers/repositories/git_http_controller.rb index 35ea77183b8..29bff3ef1e9 100644 --- a/app/controllers/repositories/git_http_controller.rb +++ b/app/controllers/repositories/git_http_controller.rb @@ -4,6 +4,7 @@ module Repositories class GitHttpController < Repositories::GitHttpClientController include WorkhorseRequest + before_action :snippet_request_allowed? before_action :access_check prepend_before_action :deny_head_requests, only: [:info_refs] @@ -12,8 +13,6 @@ module Repositories rescue_from Gitlab::GitAccess::ProjectCreationError, with: :render_422_with_exception rescue_from Gitlab::GitAccess::TimeoutError, with: :render_503_with_exception - before_action :snippet_request_allowed? - # GET /foo/bar.git/info/refs?service=git-upload-pack (git pull) # GET /foo/bar.git/info/refs?service=git-receive-pack (git push) def info_refs @@ -121,6 +120,7 @@ module Repositories def snippet_request_allowed? if repo_type.snippet? && Feature.disabled?(:version_snippets, user) + Gitlab::AppLogger.info('Snippet access attempt with feature disabled') render plain: 'The project you were looking for could not be found.', status: :not_found end end |