From 171f8e343d6f04a97225898211ecd83ddddf412f Mon Sep 17 00:00:00 2001 From: Luka Mirosevic Date: Wed, 11 Nov 2015 12:38:12 +0100 Subject: [PATCH 1/3] Fixed typo --- lib/sigh/resign.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sigh/resign.rb b/lib/sigh/resign.rb index 35d1c00..218662c 100644 --- a/lib/sigh/resign.rb +++ b/lib/sigh/resign.rb @@ -7,7 +7,7 @@ def run(options, args) # get the command line inputs and parse those into the vars we need... ipa, signing_identity, provisioning_profiles = get_inputs(options, args) - # ... then invoke out programmatic interface with these vars + # ... then invoke our programmatic interface with these vars resign(ipa, signing_identity, provisioning_profiles) end From 879e5b366b641d44693a77c40fb6772375d82fe1 Mon Sep 17 00:00:00 2001 From: Luka Mirosevic Date: Wed, 11 Nov 2015 12:39:11 +0100 Subject: [PATCH 2/3] Fixed bug with the whole command being shell escaped, including the space between the param name and param value, so that just the param value is escaped --- lib/sigh/resign.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sigh/resign.rb b/lib/sigh/resign.rb index 218662c..dd551ee 100644 --- a/lib/sigh/resign.rb +++ b/lib/sigh/resign.rb @@ -26,13 +26,13 @@ def resign(ipa, signing_identity, provisioning_profiles) # validate that we have valid values for all these params, we don't need to check signing_identity because `find_signing_identity` will only ever return a valid value validate_params(resign_path, ipa, provisioning_profiles) - provisioning_options = provisioning_profiles.map { |fst, snd| "-p #{[fst, snd].compact.join('=')}" }.join(' ') + provisioning_options = provisioning_profiles.map { |fst, snd| "-p #{[fst, snd].compact.map(&:shellescape).join('=')}" }.join(' ') command = [ resign_path.shellescape, ipa.shellescape, signing_identity.shellescape, - provisioning_options.shellescape, + provisioning_options,# we are aleady shellescaping this above, when we create the provisioning_options from the provisioning_profiles ipa.shellescape ].join(' ') From 9fa1f4245ae0934b4ebc586bc8830b65a5a168a4 Mon Sep 17 00:00:00 2001 From: Luka Mirosevic Date: Wed, 11 Nov 2015 12:43:21 +0100 Subject: [PATCH 3/3] style --- lib/sigh/resign.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sigh/resign.rb b/lib/sigh/resign.rb index dd551ee..d89644e 100644 --- a/lib/sigh/resign.rb +++ b/lib/sigh/resign.rb @@ -32,7 +32,7 @@ def resign(ipa, signing_identity, provisioning_profiles) resign_path.shellescape, ipa.shellescape, signing_identity.shellescape, - provisioning_options,# we are aleady shellescaping this above, when we create the provisioning_options from the provisioning_profiles + provisioning_options, # we are aleady shellescaping this above, when we create the provisioning_options from the provisioning_profiles ipa.shellescape ].join(' ')