Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-12-20 11:45:37 +0300
committerRémy Coutable <remy@rymai.me>2016-12-20 11:45:37 +0300
commit212967aefb55e0792a36e67a881b66c8bd871e9f (patch)
tree0dff682d6403318633ce9dddc4a119ead7294839 /lib/gitlab/git/rev_list.rb
parentc1dbae90033c10bef1aaa3c5c34219c1d0e5ef61 (diff)
Reject blank environment vcariables in Gitlab::Git::RevList
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/gitlab/git/rev_list.rb')
-rw-r--r--lib/gitlab/git/rev_list.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/git/rev_list.rb b/lib/gitlab/git/rev_list.rb
index 25e9d619697..79dd0cf7df2 100644
--- a/lib/gitlab/git/rev_list.rb
+++ b/lib/gitlab/git/rev_list.rb
@@ -22,7 +22,7 @@ module Gitlab
def valid?
environment_variables.all? do |(name, value)|
- value.start_with?(project.repository.path_to_repo)
+ value.to_s.start_with?(project.repository.path_to_repo)
end
end
@@ -35,7 +35,7 @@ module Gitlab
end
def environment_variables
- @environment_variables ||= env.slice(*ALLOWED_VARIABLES)
+ @environment_variables ||= env.slice(*ALLOWED_VARIABLES).compact
end
end
end