]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-server-cmd-data - Properly block pipeline upon final DATA/BDAT command
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 27 Aug 2025 15:03:19 +0000 (17:03 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 26 Sep 2025 01:42:21 +0000 (03:42 +0200)
Never process the next transaction from the input when the current one is not
finished.

src/lib-smtp/smtp-server-cmd-data.c

index 7302e06a61c294b7af79edb21c658d755cf7be62..01be8803795264d370ca999fa0c70d74d8e0e4c5 100644 (file)
@@ -521,6 +521,7 @@ void smtp_server_cmd_data(struct smtp_server_cmd_ctx *cmd,
        }
 
        smtp_server_command_input_lock(cmd);
+       smtp_server_command_pipeline_block(cmd);
 
        data_cmd = p_new(cmd->pool, struct cmd_data_context, 1);
        data_cmd->chunk_first = TRUE;
@@ -605,6 +606,7 @@ int smtp_server_connection_data_chunk_add(struct smtp_server_cmd_ctx *cmd,
                smtp_server_command_add_hook(
                        command, SMTP_SERVER_COMMAND_HOOK_REPLIED,
                        cmd_data_replied, data_cmd);
+               smtp_server_command_pipeline_block(cmd);
        }
 
        data_cmd->chunk_input = chunk;