diff --git a/roles/homeassistant/files/auth-command.sh b/roles/homeassistant/files/auth-command.sh index 6b2c2dc..e64ee9c 100755 --- a/roles/homeassistant/files/auth-command.sh +++ b/roles/homeassistant/files/auth-command.sh @@ -2,6 +2,12 @@ set -eu +umask 077 + +if [ -z "${username:-}" ] || [ -z "${password:-}" ]; then + exit 2 +fi + if [ "$(echo "$username" | sed -r 's/^[a-z]+$/x/')" != "x" ]; then exit 2 fi