From 9d334bee66a75bd334b8f241f1c31ce6cc0f5f17 Mon Sep 17 00:00:00 2001 From: Sam Tygier Date: Tue, 7 Jan 2020 21:48:09 +0000 Subject: [PATCH] WPA_PASSWORD length check should only occur if set Test if WPA_PASSWORD is set before check that it has a valid length. --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 4ef6296..9e78728 100755 --- a/build.sh +++ b/build.sh @@ -220,7 +220,7 @@ if [[ -n "${APT_PROXY}" ]] && ! curl --silent "${APT_PROXY}" >/dev/null ; then exit 1 fi -if [[ ${#WPA_PASSWORD} -lt 8 || ${#WPA_PASSWORD} -gt 63 ]] ; then +if [[ -n "${WPA_PASSWORD}" && ${#WPA_PASSWORD} -lt 8 || ${#WPA_PASSWORD} -gt 63 ]] ; then echo "WPA_PASSWORD" must be between 8 and 63 characters exit 1 fi