Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6856:a249d916f6e6 HEAD
If client tries to use unknown list-extended options, fail with BAD.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 25 Nov 2007 15:05:31 +0200 |
parents | 5c514ebda66a |
children | 41911abe6fa7 |
files | src/imap/cmd-list.c |
diffstat | 1 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-list.c Sun Nov 25 03:15:07 2007 +0200 +++ b/src/imap/cmd-list.c Sun Nov 25 15:05:31 2007 +0200 @@ -108,10 +108,13 @@ MAILBOX_LIST_ITER_RETURN_SUBSCRIBED; } else if (strcasecmp(atom, "RECURSIVEMATCH") == 0) list_flags |= MAILBOX_LIST_ITER_SELECT_RECURSIVEMATCH; - else { + else if (strcasecmp(atom, "REMOTE") == 0) { + /* not supported, ignore */ + } else { /* skip also optional list value */ - if (args[1].type == IMAP_ARG_LIST) - args++; + client_send_command_error(ctx->cmd, + "Unknown select options"); + return FALSE; } args++; } @@ -156,8 +159,9 @@ args++; } else { /* skip also optional list value */ - if (args[1].type == IMAP_ARG_LIST) - args++; + client_send_command_error(ctx->cmd, + "Unknown return options"); + return FALSE; } args++; }