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:08:23 GMT
Repository: ant
Updated Branches:
  refs/heads/master b37d64d02 -> a50633c17


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/26d8c5ff
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/26d8c5ff
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/26d8c5ff

Branch: refs/heads/master
Commit: 26d8c5ff244144e679d699deededf3ac33cab23d
Parents: b37d64d
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:03:17 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/ant/blob/26d8c5ff/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