summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-03-04 22:26:52 -0500
committerAde Lee <alee@redhat.com>2012-03-05 16:49:07 -0500
commitf1f2482bb0a6a812ccaffc2bfbb8761323ecd8c8 (patch)
treef92400e1770c3eb03b2e38a2f4ee10f8d7b3e924
parent2956ea8a9003d637a3e161621eb97f7be779d94c (diff)
downloadpki-f1f2482bb0a6a812ccaffc2bfbb8761323ecd8c8.tar.gz
pki-f1f2482bb0a6a812ccaffc2bfbb8761323ecd8c8.tar.xz
pki-f1f2482bb0a6a812ccaffc2bfbb8761323ecd8c8.zip
BZ 769388 - pki-silent does not properly escape command-line arguments
-rwxr-xr-xpki/base/silent/scripts/pkisilent6
1 files changed, 5 insertions, 1 deletions
diff --git a/pki/base/silent/scripts/pkisilent b/pki/base/silent/scripts/pkisilent
index 5d62b1ce4..c5be67855 100755
--- a/pki/base/silent/scripts/pkisilent
+++ b/pki/base/silent/scripts/pkisilent
@@ -99,7 +99,11 @@ if( $ARCHITECTURE eq "x86_64" ) {
## based upon the preset LD_LIBRARY_PATH and CP environment variables. ##
###############################################################################
-my $output = `java -cp $ENV{CLASSPATH} com.netscape.pkisilent.PKISilent @ARGV`;
+my @args = ();
+foreach (@ARGV) {
+ push(@args, quotemeta($_));
+}
+my $output = `java -cp $ENV{CLASSPATH} com.netscape.pkisilent.PKISilent @args`;
my $status = $?;
print "#######################################################################\n";