Skip to content

Commit

Permalink
Adds a to_s map during validation
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Mar 23, 2022
1 parent dc919d9 commit 247c5ef
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 247c5ef

Please sign in to comment.