mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-26 11:37:19 +02:00
fix password x
This commit is contained in:
@@ -278,14 +278,14 @@ elif [ "${abcd}" = "x" ]; then
|
|||||||
# check if passwords match
|
# check if passwords match
|
||||||
if [ "${password1}" != "${password2}" ]; then
|
if [ "${password1}" != "${password2}" ]; then
|
||||||
dialog --backtitle "RaspiBlitz - Setup" --msgbox "FAIL -> Passwords dont Match\nPlease try again ..." 6 52
|
dialog --backtitle "RaspiBlitz - Setup" --msgbox "FAIL -> Passwords dont Match\nPlease try again ..." 6 52
|
||||||
sudo /home/admin/config.scripts/blitz.setpassword.sh X "$2" "$3"
|
sudo /home/admin/config.scripts/blitz.setpassword.sh x "$2" "$3"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# password zero
|
# password zero
|
||||||
if [ ${#password1} -eq 0 ]; then
|
if [ ${#password1} -eq 0 ]; then
|
||||||
dialog --backtitle "RaspiBlitz - Setup" --msgbox "FAIL -> Password cannot be empty\nPlease try again ..." 6 52
|
dialog --backtitle "RaspiBlitz - Setup" --msgbox "FAIL -> Password cannot be empty\nPlease try again ..." 6 52
|
||||||
sudo /home/admin/config.scripts/blitz.setpassword.sh X "$2" "$3"
|
sudo /home/admin/config.scripts/blitz.setpassword.sh x "$2" "$3"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -293,14 +293,14 @@ elif [ "${abcd}" = "x" ]; then
|
|||||||
clearedResult=$(echo "${password1}" | tr -dc '[:alnum:]-.' | tr -d ' ')
|
clearedResult=$(echo "${password1}" | tr -dc '[:alnum:]-.' | tr -d ' ')
|
||||||
if [ ${#clearedResult} != ${#password1} ] || [ ${#clearedResult} -eq 0 ]; then
|
if [ ${#clearedResult} != ${#password1} ] || [ ${#clearedResult} -eq 0 ]; then
|
||||||
dialog --backtitle "RaspiBlitz - Setup" --msgbox "FAIL -> Contains bad characters (spaces, special chars)\nPlease try again ..." 6 52
|
dialog --backtitle "RaspiBlitz - Setup" --msgbox "FAIL -> Contains bad characters (spaces, special chars)\nPlease try again ..." 6 52
|
||||||
sudo /home/admin/config.scripts/blitz.setpassword.sh X "$2" "$3"
|
sudo /home/admin/config.scripts/blitz.setpassword.sh x "$2" "$3"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# password longer than 8
|
# password longer than 8
|
||||||
if [ ${#password1} -lt 8 ]; then
|
if [ ${#password1} -lt 8 ]; then
|
||||||
dialog --backtitle "RaspiBlitz - Setup" --msgbox "FAIL -> Password length under 8\nPlease try again ..." 6 52
|
dialog --backtitle "RaspiBlitz - Setup" --msgbox "FAIL -> Password length under 8\nPlease try again ..." 6 52
|
||||||
sudo /home/admin/config.scripts/blitz.setpassword.sh X "$2" "$3"
|
sudo /home/admin/config.scripts/blitz.setpassword.sh x "$2" "$3"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user