mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
Check password length during installation
This commit is contained in:
parent
0ea68af329
commit
931432b866
@ -8,6 +8,7 @@
|
||||
- Ask for confirmation before booking a slot for a member without the required tag
|
||||
- Corrected the documentation about BOOK_SLOT_AT_SAME_TIME
|
||||
- Auto-adjusts text colors based on the selected theme colors
|
||||
- Check password length during installation
|
||||
- Fix a bug: accounting periods totals are wrong for periods closed after 2019-08-01
|
||||
- Fix a bug: unable to change group if the previous was deactivated
|
||||
- Fix a bug: unable to create events or trainings that are not multiples of SLOT_DURATION
|
||||
|
@ -264,11 +264,17 @@ read_password()
|
||||
local password confirmation
|
||||
>&2 echo "Please input a password for this administrator's account"
|
||||
read -rsp " > " password </dev/tty
|
||||
>&2 printf "\nConfirm the password\n"
|
||||
read -rsp " > " confirmation </dev/tty
|
||||
if [ "$password" != "$confirmation" ]; then
|
||||
>&2 printf "\nError: passwords mismatch\n"
|
||||
password=$(read_password)
|
||||
if [ ${#password} -lt 8 ]; then
|
||||
>&2 printf "\nError: password is too short (minimal length: 8 characters)\n"
|
||||
password=$(read_password 'no-confirm')
|
||||
fi
|
||||
if [ "$1" != 'no-confirm' ]; then
|
||||
>&2 printf "\nConfirm the password\n"
|
||||
read -rsp " > " confirmation </dev/tty
|
||||
if [ "$password" != "$confirmation" ]; then
|
||||
>&2 printf "\nError: passwords mismatch\n"
|
||||
password=$(read_password)
|
||||
fi
|
||||
fi
|
||||
echo "$password"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user