WPA_PASSWORD length check should only occur if set

Test if WPA_PASSWORD is set before check that it has a valid length.
master
Sam Tygier 2020-01-07 21:48:09 +00:00 committed by XECDesign
parent 024840034e
commit 9d334bee66
1 changed files with 1 additions and 1 deletions

View File

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