Permalink
Browse files

Escape arguments (#342)

* Escape arguments for system call

* Require Shellwords at the beginning
  • Loading branch information...
1 parent b0b6d71 commit e9de171408064830208d7167d5a9248247b221b8 @dankimio dankimio committed on GitHub Feb 12, 2017
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/shenzhen/plugins/s3.rb
@@ -1,4 +1,5 @@
require 'aws-sdk'
+require 'shellwords'
module Shenzhen::Plugins
module S3
@@ -40,7 +41,7 @@ def expand_path_with_substitutions_from_ipa_plist(ipa, path)
return path if substitutions.empty?
Dir.mktmpdir do |dir|
- system "unzip -q #{ipa} -d #{dir} 2> /dev/null"
+ system "unzip -q #{Shellwords.escape(ipa)} -d #{Shellwords.escape(dir)} 2> /dev/null"
plist = Dir["#{dir}/**/*.app/Info.plist"].last

0 comments on commit e9de171

Please sign in to comment.