dovecot-2.2: imap: Don't allow empty CATENATE () list.
dovecot at dovecot.org
dovecot at dovecot.org
Thu May 2 18:18:38 EEST 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/5e2fa592c268
changeset: 16323:5e2fa592c268
user: Timo Sirainen <tss at iki.fi>
date: Thu May 02 18:18:26 2013 +0300
description:
imap: Don't allow empty CATENATE () list.
diffstat:
src/imap/cmd-append.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (23 lines):
diff -r 8e5ff6809d75 -r 5e2fa592c268 src/imap/cmd-append.c
--- a/src/imap/cmd-append.c Thu May 02 18:11:56 2013 +0300
+++ b/src/imap/cmd-append.c Thu May 02 18:18:26 2013 +0300
@@ -586,6 +586,10 @@
if (cat_list == NULL) {
/* normal APPEND */
return 1;
+ } else if (cat_list->type == IMAP_ARG_EOL) {
+ /* zero parts */
+ client_send_command_error(cmd, "Empty CATENATE list.");
+ return -1;
} else if ((ret = cmd_append_catenate(cmd, cat_list, nonsync_r)) < 0) {
/* invalid parameters, abort immediately */
return -1;
@@ -734,6 +738,8 @@
ret = cmd_append_handle_args(cmd, args, &nonsync);
if (ret < 0) {
/* invalid parameters, abort immediately */
+ if (ctx->catenate)
+ client->input_skip_line = TRUE;
cmd_append_finish(ctx);
return TRUE;
}
More information about the dovecot-cvs
mailing list