homeassistant: More robust auth command

This commit is contained in:
Timo Makinen 2024-01-17 20:41:53 +00:00
parent 5900c39b59
commit adbc274797

View file

@ -2,6 +2,12 @@
set -eu set -eu
umask 077
if [ -z "${username:-}" ] || [ -z "${password:-}" ]; then
exit 2
fi
if [ "$(echo "$username" | sed -r 's/^[a-z]+$/x/')" != "x" ]; then if [ "$(echo "$username" | sed -r 's/^[a-z]+$/x/')" != "x" ]; then
exit 2 exit 2
fi fi