diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f792d961..58dcd5149 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/setup/setup.sh b/setup/setup.sh index 0b3a7a715..6d117e7d0 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -264,11 +264,17 @@ read_password() local password confirmation >&2 echo "Please input a password for this administrator's account" read -rsp " > " password &2 printf "\nConfirm the password\n" - read -rsp " > " confirmation &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 &2 printf "\nError: passwords mismatch\n" + password=$(read_password) + fi fi echo "$password" }