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 <[email protected]> Authored: Mon Sep 19 15:29:09 2016 -0400 Committer: Stefan Bodewig <[email protected]> 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
