quote variables

This commit is contained in:
Midov 2022-08-20 12:41:19 +02:00
parent b0877b180c
commit 244ec33309

View File

@ -72,17 +72,17 @@ registerscript() {
# contains the secret variable with the shared secret thing for synapse
source ~/.secret
# script from synapse.. should have curled the api but i did not want to deal with the nonces
~/register_new_matrix_user.py -u "$login" -p "$password" --no-admin -k $secret http://yoshika.midov.pl:8008
~/register_new_matrix_user.py -u "$login" -p "$password" --no-admin -k "$secret" http://yoshika.midov.pl:8008
regstatus=$?
unset secret
}
data=$(cat)
id=$(rawurldecode $(echo "$data" | cut -d '=' -f 5))
login=$(rawurldecode $(echo "$data" | cut -d '=' -f 2 | cut -d '&' -f 1))
password=$(rawurldecode $(echo "$data" | cut -d '=' -f 3 | cut -d '&' -f 1))
retype=$(rawurldecode $(echo "$data" | cut -d '=' -f 4 | cut -d '&' -f 1))
id=$(rawurldecode "$(echo "$data" | cut -d '=' -f 5)")
login=$(rawurldecode "$(echo "$data" | cut -d '=' -f 2 | cut -d '&' -f 1)")
password=$(rawurldecode "$(echo "$data" | cut -d '=' -f 3 | cut -d '&' -f 1)")
retype=$(rawurldecode "$(echo "$data" | cut -d '=' -f 4 | cut -d '&' -f 1)")
# returns true or false depending if user passed or not
captcha=$(checkcaptchouli "$id")