ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [1/2] ant git commit: fix 60150 values containing backtick or $ character cause shell error on *nix
Date Wed, 28 Sep 2016 19:09:58 GMT
Repository: ant
Updated Branches:
  refs/heads/1.9.x a3897d4e9 -> 642a050e0


fix 60150 values containing backtick or $ character cause shell error on *nix


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/ce684365
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/ce684365
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/ce684365

Branch: refs/heads/1.9.x
Commit: ce6843657c831248a3a3ca90ecb1d12d370d5a44
Parents: a3897d4
Author: Jeffrey Adamson <jwadamson@us.ibm.com>
Authored: Mon Sep 19 15:29:09 2016 -0400
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Wed Sep 28 21:09:05 2016 +0200

----------------------------------------------------------------------
 src/script/ant | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/ce684365/src/script/ant
----------------------------------------------------------------------
diff --git a/src/script/ant b/src/script/ant
old mode 100644
new mode 100755
index 043f3fc..2276b7c
--- a/src/script/ant
+++ b/src/script/ant
@@ -35,8 +35,8 @@ for arg in "$@" ; do
     if [  my"$arg" = my"-h"  -o  my"$arg" = my"-help" ] ; then
       show_help=true
     fi
-    # wrap all arguments as "" strings, escape any internal back-slash or double-quote characters
-    ant_exec_args="$ant_exec_args \"$(printf '%s\n' "$arg" | sed -e 's@"\|\\@\\\0@g' )\""
+    # wrap all arguments as "" strings, escape any internal back-slash, double-quote, $,
or back-tick characters
+    ant_exec_args="$ant_exec_args \"$(printf '%s\n' "$arg" | sed -e 's@\$\|`\|"\|\\@\\\0@g'
)\""
   fi
 done
 


Mime
View raw message