Skip to content

Commit 957e137

Browse files
committed
Merge pull request #327 from CVTJNII/rabbitmq-script-wrapper_quote-fix_stable
Quote arg to prevent shell expansion, Issue-325
2 parents 77c074b + 0105c77 commit 957e137

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packaging/common/rabbitmq-script-wrapper

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fi
2222

2323
for arg in "$@" ; do
2424
# Wrap each arg in single quotes and wrap single quotes in double quotes, so that they're passed through cleanly.
25-
arg=`printf %s $arg | sed $SED_OPT -e "s/'/'\"'\"'/g"`
25+
arg=`printf %s "$arg" | sed $SED_OPT -e "s/'/'\"'\"'/g"`
2626
CMDLINE="${CMDLINE} '${arg}'"
2727
done
2828

0 commit comments

Comments
 (0)