From ce6843657c831248a3a3ca90ecb1d12d370d5a44 Mon Sep 17 00:00:00 2001 From: Jeffrey Adamson Date: Mon, 19 Sep 2016 15:29:09 -0400 Subject: [PATCH 1/2] fix 60150 values containing backtick or $ character cause shell error on *nix --- src/script/ant | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/script/ant diff --git a/src/script/ant b/src/script/ant old mode 100644 new mode 100755 index 043f3fc20..2276b7c00 --- 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 From 642a050e0f2ce8e7c55a41c2781cee63843ad9a1 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Wed, 28 Sep 2016 21:06:53 +0200 Subject: [PATCH 2/2] record fix for https://bz.apache.org/bugzilla/show_bug.cgi?id=60150 closes #24 thanks to @jwadamson --- WHATSNEW | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WHATSNEW b/WHATSNEW index 215f8cb21..6eda90f9b 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -52,6 +52,10 @@ Fixed bugs: * Clarified the documentation of 's retries attribute. Bugzilla Report 59930 + * The ant wrapper script failed if backticks were passed on the + command line. + Bugzilla Report 60150, 59445 + Other changes: --------------