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.
This commit is contained in:
casperklein 2024-06-16 23:48:22 +02:00
parent d8574da0b9
commit 7a4186fada
1 changed files with 1 additions and 2 deletions

View File

@ -7,8 +7,7 @@ function _main() {
_require_n_parameters_or_print_usage 1 "${@}" _require_n_parameters_or_print_usage 1 "${@}"
local MAIL_ACCOUNT="${1}" local MAIL_ACCOUNT="${1}"
shift local PASSWD="${2}"
local PASSWD="${*}"
_manage_accounts_create "${MAIL_ACCOUNT}" "${PASSWD}" _manage_accounts_create "${MAIL_ACCOUNT}" "${PASSWD}"