summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-08-03 14:54:12 +0200
committerJacob Vosmaer <jacob@gitlab.com>2016-08-03 14:54:12 +0200
commitb8f754dd0abdf437669e17a820a8e6c230afa73e (patch)
treef76dd495f2e4299c2588a4fb98286b91938d78df /lib
parent132a81f4e1bb1675baa091df3ce1bae415290d7f (diff)
downloadgitlab-ce-b8f754dd0abdf437669e17a820a8e6c230afa73e.tar.gz
Stop 'git push' over HTTP early
Before this change we always let users push Git data over HTTP before deciding whether to accept to push. This was different from pushing over SSH where we terminate a 'git push' early if we already know the user is not allowed to push. This change let Git over HTTP follow the same behavior as Git over SSH. We also distinguish between HTTP 404 and 403 responses when denying Git requests, depending on whether the user is allowed to know the project exists.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git_access.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb
index 8e8f39d9cb2..69943e22353 100644
--- a/lib/gitlab/git_access.rb
+++ b/lib/gitlab/git_access.rb
@@ -14,7 +14,7 @@ module Gitlab
@user_access = UserAccess.new(user, project: project)
end
- def check(cmd, changes = nil)
+ def check(cmd, changes)
return build_status_object(false, "Git access over #{protocol.upcase} is not allowed") unless protocol_allowed?
unless actor