From 247c5efc77282d1ed35c7f57c7ee5f846e2fdf97 Mon Sep 17 00:00:00 2001 From: orta Date: Wed, 23 Mar 2022 07:45:17 +0000 Subject: [PATCH] Adds a to_s map during validation --- lib/cocoapods-downloader/git.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cocoapods-downloader/git.rb b/lib/cocoapods-downloader/git.rb index f9804a2..1312a88 100644 --- a/lib/cocoapods-downloader/git.rb +++ b/lib/cocoapods-downloader/git.rb @@ -59,7 +59,7 @@ def self.commit_from_ls_remote(output, branch_name) end def self.validate_input(options) - input = [options[:git], options[:branch], options[:commit], options[:tag]] + input = [options[:git], options[:branch], options[:commit], options[:tag]].map(&:to_s) invalid = input.compact.any? { |value| value.start_with?('--') || value.include?(' --') } raise DownloaderError, "Provided unsafe input for git #{options}." if invalid end