From 785e3c116d65691510559f8c669a648c76c9031c Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Thu, 15 Feb 2024 18:07:53 +0900 Subject: [PATCH] Fix password set length check --- bin/create_user.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/create_user.sh b/bin/create_user.sh index d4456e1..47a84b4 100755 --- a/bin/create_user.sh +++ b/bin/create_user.sh @@ -88,7 +88,7 @@ if [ ! -d "${HOME_FOLDER}" ]; then error=1; fi; # allow 10 to 39 length for password -if ! [[ "${PASSWORD_LENGTH}" =~ ^[13][0-9]$ ]]; then +if [ ! -z "${PASSWORD_LENGTH}" ] && ! [[ "${PASSWORD_LENGTH}" =~ ^[13][0-9]$ ]]; then echo "Password length set error, can only be a value between 10 and 39"; error=1; elif [ -z ${PASSWORD_LENGTH} ]; then