summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-08-08 19:23:31 +0000
committerRobert Speicher <robert@gitlab.com>2016-08-08 19:23:31 +0000
commit86c081f71fabbc5877b415031855df2d83e9c64c (patch)
tree706c0f78361008b68ad6ec14cd20dbb6758116b4 /lib
parentc9240d91b04fa5c7376dc2bc257da41f32468cdc (diff)
parente55e224cd9d5dfb3fc351374a0cd4620f8e845b9 (diff)
downloadgitlab-ce-86c081f71fabbc5877b415031855df2d83e9c64c.tar.gz
Merge branch 'git-http-push-check' into 'master'
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. See merge request !5639
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