homeassistant: Check invalid characters in user
This commit is contained in:
parent
c5802078c4
commit
9946bd838b
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
if [ "$(echo "$username" | sed -r 's/^[a-z]+$/x/')" != "x" ]; then
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
curl -sf -X POST -H "Content-Type: application/json" -d @- \
|
curl -sf -X POST -H "Content-Type: application/json" -d @- \
|
||||||
https://id.foo.sh/authcheck <<EOF
|
https://id.foo.sh/authcheck <<EOF
|
||||||
{"username": "${username}", "password": "${password}", "group": "foosh"}
|
{"username": "${username}", "password": "${password}", "group": "foosh"}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue