Skip to content
Snippets Groups Projects
Commit d1151f76 authored by Patricio Cano's avatar Patricio Cano
Browse files

Don't allow empty strings in the `protocol` check.

parent 9397ce91
Branches
Tags
1 merge request!4696Add setting that allows admins to choose which Git access protocols are enabled.
Loading
@@ -50,7 +50,7 @@ module Gitlab
Loading
@@ -50,7 +50,7 @@ module Gitlab
end end
   
def check(cmd, changes = nil) def check(cmd, changes = nil)
raise 'Access denied due to unspecified Git access protocol' unless protocol raise 'Access denied due to unspecified Git access protocol' unless protocol.present?
   
return build_status_object(false, "Git access over #{protocol.upcase} is not allowed") unless protocol_allowed? return build_status_object(false, "Git access over #{protocol.upcase} is not allowed") unless protocol_allowed?
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment