Fix password set length check

This commit is contained in:
Clemens Schwaighofer
2024-02-15 18:07:53 +09:00
parent adbfeb0074
commit 785e3c116d

View File

@@ -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