From 4ee82977af1b010aaa46256d853ffc4a0a4308c2 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 12 Nov 2026 09:25:25 -0800 Subject: [PATCH] docker: pass entrypoint arguments to weed without splitting them (#12589) The master, volume, volume-rust, server, mini, filer and s3 cases and the fallback forwarded the user arguments as an unquoted $@, so the shell split each one at whitespace and globbed it against /data. An -admin.password with a space reached weed as two words, and weed ignored every flag after the stray word. Quote "$@" as the other cases already do; $ARGS stays unquoted since the script builds it from its own words. Co-authored-by: Claude Opus 5.5 --- docker/entrypoint.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 8e6ee840c5..fca7c82b42 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -64,7 +64,7 @@ case "$1" in 'master') ARGS="-mdir=/data -volumeSizeLimitMB=1024" shift - exec /usr/bin/weed -logtostderr=true master $ARGS $@ + exec /usr/bin/weed -logtostderr=true master $ARGS "$@" ;; 'volume') @@ -73,7 +73,7 @@ case "$1" in ARGS="-dir=/data" fi shift - exec /usr/bin/weed -logtostderr=true volume $ARGS $@ + exec /usr/bin/weed -logtostderr=true volume $ARGS "$@" ;; 'volume-rust') @@ -87,7 +87,7 @@ case "$1" in echo "Use 'volume' for the Go volume server instead." >&2 exit 1 fi - exec /usr/bin/weed-volume $ARGS $@ + exec /usr/bin/weed-volume $ARGS "$@" ;; 'worker-rust') @@ -119,7 +119,7 @@ case "$1" in ARGS="-dir=/data -master.volumeSizeLimitMB=1024" fi shift - exec /usr/bin/weed -logtostderr=true server $ARGS $@ + exec /usr/bin/weed -logtostderr=true server $ARGS "$@" ;; 'mini') @@ -128,19 +128,19 @@ case "$1" in ARGS="" fi shift - exec /usr/bin/weed -logtostderr=true mini $ARGS $@ + exec /usr/bin/weed -logtostderr=true mini $ARGS "$@" ;; 'filer') ARGS="" shift - exec /usr/bin/weed -logtostderr=true filer $ARGS $@ + exec /usr/bin/weed -logtostderr=true filer $ARGS "$@" ;; 's3') ARGS="-domainName=$S3_DOMAIN_NAME -key.file=$S3_KEY_FILE -cert.file=$S3_CERT_FILE" shift - exec /usr/bin/weed -logtostderr=true s3 $ARGS $@ + exec /usr/bin/weed -logtostderr=true s3 $ARGS "$@" ;; 'shell') @@ -150,6 +150,6 @@ case "$1" in ;; *) - exec /usr/bin/weed $@ + exec /usr/bin/weed "$@" ;; esac