From 57e096aefee57643d2c3c707392d7082c5cd6b85 Mon Sep 17 00:00:00 2001 From: Kenneth Bingham Date: Tue, 17 Jan 2023 16:14:47 -0500 Subject: [PATCH] force single-byte locale in command "tr" when generating random password --- quickstart/docker/image/ziti-cli-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstart/docker/image/ziti-cli-functions.sh b/quickstart/docker/image/ziti-cli-functions.sh index 358f5433a..87f12020c 100755 --- a/quickstart/docker/image/ziti-cli-functions.sh +++ b/quickstart/docker/image/ziti-cli-functions.sh @@ -1077,7 +1077,7 @@ function ziti_createEnvFile { if [[ "${ZITI_USER-}" == "" ]]; then export ZITI_USER="admin"; fi if [[ "${ZITI_PWD-}" == "" ]]; then - ZITI_PWD="$(tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c32)" + ZITI_PWD="$(LC_ALL=C tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c32)" echo -en "Do you want to keep the generated admin password '$ZITI_PWD'? (Y/n) " # shellcheck disable=SC2162 read -r pwd_reply