]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
smtp: completes RSET transaction on last multiline
authorPhilippe Antoine <contact@catenacyber.fr>
Wed, 14 Jul 2021 17:40:42 +0000 (19:40 +0200)
committerVictor Julien <vjulien@oisf.net>
Fri, 12 Nov 2021 14:21:07 +0000 (15:21 +0100)
Bug: #4561.

src/app-layer-smtp.c

index e8dc4d585f35892ec1eb4f26294f31ff058d40fc..bb116ecc0ec7a08cdbda8ccf8648394373e25b53 100644 (file)
@@ -1060,7 +1060,8 @@ static int SMTPProcessReply(SMTPState *state, Flow *f,
             SMTPSetEvent(state, SMTP_DECODER_EVENT_DATA_COMMAND_REJECTED);
         }
     } else if (IsReplyToCommand(state, SMTP_COMMAND_RSET)) {
-        if (reply_code == SMTP_REPLY_250) {
+        if (reply_code == SMTP_REPLY_250 &&
+                !(state->parser_state & SMTP_PARSER_STATE_PARSING_MULTILINE_REPLY)) {
             SMTPTransactionComplete(state);
         }
     } else {