mirror of
https://github.com/itzg/docker-minecraft-server
synced 2024-12-13 13:52:27 +00:00
fix(minecraft-server): env variable value check not working
The check for the value of the env variable now works correctly. #298
This commit is contained in:
parent
67cf80d70f
commit
73046d7499
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue