From: Timo Sirainen Date: Wed, 26 May 2010 18:33:16 +0000 (+0100) Subject: doveadm auth: Fail if after password there is more parameters. X-Git-Tag: 2.0.beta6~144 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=456a8d49d8234cdd2d5e087cfb553502dba136b6;p=thirdparty%2Fdovecot%2Fcore.git doveadm auth: Fail if after password there is more parameters. --HG-- branch : HEAD --- diff --git a/src/doveadm/doveadm-auth.c b/src/doveadm/doveadm-auth.c index 3158ede5c9..effe664d0f 100644 --- a/src/doveadm/doveadm-auth.c +++ b/src/doveadm/doveadm-auth.c @@ -195,8 +195,10 @@ auth_cmd_common(const struct doveadm_cmd *cmd, int argc, char *argv[]) if (cmd == &doveadm_cmd_auth) { input.username = argv[optind++]; - input.password = argv[optind] != NULL ? argv[optind] : + input.password = argv[optind] != NULL ? argv[optind++] : t_askpass("Password: "); + if (argv[optind] != NULL) + i_fatal("Unexpected parameter: %s", argv[optind]); if (cmd_auth_input(auth_socket_path, &input) < 0) exit(FATAL_DEFAULT); if (!input.success)