From d8574da0b9f7a979a86b454ca8691433838e2759 Mon Sep 17 00:00:00 2001 From: casperklein Date: Sun, 16 Jun 2024 23:42:09 +0200 Subject: [PATCH] Add password confirmation --- target/scripts/helpers/database/manage/postfix-accounts.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/scripts/helpers/database/manage/postfix-accounts.sh b/target/scripts/helpers/database/manage/postfix-accounts.sh index 987254fc..24827b19 100644 --- a/target/scripts/helpers/database/manage/postfix-accounts.sh +++ b/target/scripts/helpers/database/manage/postfix-accounts.sh @@ -98,9 +98,14 @@ function __account_already_exists() { # Also used by addsaslpassword function _password_request_if_missing() { + local CONFIRM if [[ -z ${PASSWD} ]]; then read -r -s -p 'Enter Password: ' PASSWD echo [[ -z ${PASSWD} ]] && _exit_with_error 'Password must not be empty' + + read -r -s -p 'Confirm Password: ' CONFIRM + echo + [[ ${PASSWD} != "${CONFIRM}" ]] && _exit_with_error 'Passwords do not match!' fi }