Commit 1ad2a93678c3a513fcc6ba575343c0b1d93a16f0
Exists in
spb-stable
and in
3 other branches
Merge pull request #5760 from dermoth/master
Fix HTTP push to public repos
Showing
1 changed file
with
3 additions
and
0 deletions
Show diff stats
lib/gitlab/backend/grack_auth.rb
@@ -92,6 +92,9 @@ module Grack | @@ -92,6 +92,9 @@ module Grack | ||
92 | return false unless can?(user, action, project) | 92 | return false unless can?(user, action, project) |
93 | end | 93 | end |
94 | 94 | ||
95 | + # Never let git-receive-pack trough unauthenticated; it's | ||
96 | + # harmless but git < 1.8 doesn't like it | ||
97 | + return false if user.nil? | ||
95 | true | 98 | true |
96 | else | 99 | else |
97 | false | 100 | false |