From 7a4186fada90dd2cf20ff6bb765f1afae4b831c8 Mon Sep 17 00:00:00 2001 From: casperklein Date: Sun, 16 Jun 2024 23:48:22 +0200 Subject: [PATCH] Password must be the second parameter More strict handling of the password parameter. After `shift`, `$*` considers not only the first parameter, but all as password. `setup email add foo@example.com top secret` makes "topsecret" the password, which is weird. --- target/bin/addmailuser | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/bin/addmailuser b/target/bin/addmailuser index 15691c89..0eee9d82 100755 --- a/target/bin/addmailuser +++ b/target/bin/addmailuser @@ -7,8 +7,7 @@ function _main() { _require_n_parameters_or_print_usage 1 "${@}" local MAIL_ACCOUNT="${1}" - shift - local PASSWD="${*}" + local PASSWD="${2}" _manage_accounts_create "${MAIL_ACCOUNT}" "${PASSWD}"