Skip to content

Commit

Permalink
Merge pull request #125 from CocoaPods/_to_s
Browse files Browse the repository at this point in the history
Adds a to_s map during validation
  • Loading branch information
dnkoutso authored Mar 23, 2022
2 parents dc919d9 + 247c5ef commit 76ea172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cocoapods-downloader/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 76ea172

Please sign in to comment.