]> 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>
Mon, 15 Nov 2021 12:25:08 +0000 (13:25 +0100)
Bug: #4561.
(cherry picked from commit f44bbbb9ada39893279965a98831620074205871)

src/app-layer-smtp.c

index 0038a97dd2019a492313426862637221175d654b..40607d9ef1d74e586cef2be99b54d41cdfc24ade 100644 (file)
@@ -1059,7 +1059,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 {