From d5e0fb23dee3306156a090cb7b1a4ca54e5644e8 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sun, 23 Apr 2023 12:44:27 -0500 Subject: [PATCH] Probably quote content passed to mc-send-to-console (#2093) --- bin/mc-send-to-console | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/mc-send-to-console b/bin/mc-send-to-console index c1a76b4a..d1f70ebf 100755 --- a/bin/mc-send-to-console +++ b/bin/mc-send-to-console @@ -14,9 +14,9 @@ fi if [ "$(id -u)" = 0 ]; then if [[ $(getDistro) == alpine ]]; then - exec su-exec minecraft bash -c "echo $* > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'" + exec su-exec minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'" else - exec gosu minecraft bash -c "echo $* > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'" + exec gosu minecraft bash -c "echo '$*' > '${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}'" fi else echo "$@" >"${CONSOLE_IN_NAMED_PIPE:-/tmp/minecraft-console-in}"