From: Stephan Bosch Date: Thu, 21 Nov 2019 08:42:09 +0000 (+0100) Subject: lib-smtp: smtp-server-cmd-mail - Don't implicitly accept missing '<' and '>' when... X-Git-Tag: 2.3.9~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24208aebc8b3cb89ae4a1e60a6bc9db46aaedf81;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: smtp-server-cmd-mail - Don't implicitly accept missing '<' and '>' when set->mail_path_allow_broken == TRUE. --- diff --git a/src/lib-smtp/smtp-server-cmd-mail.c b/src/lib-smtp/smtp-server-cmd-mail.c index 2834a59bbf..d21b206b08 100644 --- a/src/lib-smtp/smtp-server-cmd-mail.c +++ b/src/lib-smtp/smtp-server-cmd-mail.c @@ -107,8 +107,7 @@ void smtp_server_cmd_mail(struct smtp_server_cmd_ctx *cmd, SMTP_ADDRESS_PARSE_FLAG_ALLOW_EMPTY | SMTP_ADDRESS_PARSE_FLAG_PRESERVE_RAW; if (*params != '\0' && - (set->mail_path_allow_broken || - (set->workarounds & SMTP_SERVER_WORKAROUND_MAILBOX_FOR_PATH) != 0)) + (set->workarounds & SMTP_SERVER_WORKAROUND_MAILBOX_FOR_PATH) != 0) path_parse_flags |= SMTP_ADDRESS_PARSE_FLAG_BRACKETS_OPTIONAL; if (set->mail_path_allow_broken) { path_parse_flags |= diff --git a/src/lib-smtp/test-smtp-server-errors.c b/src/lib-smtp/test-smtp-server-errors.c index 60d5ed8127..759c332d88 100644 --- a/src/lib-smtp/test-smtp-server-errors.c +++ b/src/lib-smtp/test-smtp-server-errors.c @@ -2046,12 +2046,11 @@ test_mail_broken_path_client_input(struct client_connection *conn) break; case 1: /* bad command reply */ switch (client_index) { - case 0: case 1: case 2: case 4: case 5: - case 6: case 7: case 8: + case 0: case 1: case 2: case 3: case 4: case 5: + case 6: case 7: case 8: case 11: case 14: case 16: i_assert(reply->status == 501); break; - case 3: case 9: case 10: case 11: case 12: case 13: - case 14: case 15: case 16: case 17: + case 9: case 10: case 12: case 13: case 15: case 17: i_assert(reply->status == 250); break; default: