From 73046d7499ed9e7f13a27a0957e8f52cd43b1cf2 Mon Sep 17 00:00:00 2001 From: Michael Reichenbach Date: Mon, 25 Mar 2019 18:10:45 +0100 Subject: [PATCH] fix(minecraft-server): env variable value check not working The check for the value of the env variable now works correctly. #298 --- minecraft-server/start-finalSetup05EnvVariables | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minecraft-server/start-finalSetup05EnvVariables b/minecraft-server/start-finalSetup05EnvVariables index b209034e..7146955a 100644 --- a/minecraft-server/start-finalSetup05EnvVariables +++ b/minecraft-server/start-finalSetup05EnvVariables @@ -5,7 +5,7 @@ if [ "$REPLACE_ENV_VARIABLES" = "TRUE" ]; then while IFS='=' read -r name value ; do # check if name of env variable matches the prefix # sanity check environment variables to avoid code injections - if [[ "$name" = $ENV_VARIABLE_PREFIX* ]] && [[ $value =~ ^[0-9a-zA-Z_\-:/=?.+]*$ ]] && [[ $name =~ ^[0-9a-zA-Z_\-]*$ ]]; then + if [[ "$name" = $ENV_VARIABLE_PREFIX* ]] && [[ $value =~ ^[0-9a-zA-Z_:/=?.+\-]*$ ]] && [[ $name =~ ^[0-9a-zA-Z_\-]*$ ]]; then echo "$name = $value" find /data/ -type f -exec sed -i 's#${'"$name"'}#'"$value"'#g' {} \; fi