# HG changeset patch # User Timo Sirainen # Date 1195995931 -7200 # Node ID a249d916f6e6cb3ffa83c3343db167f471db3e62 # Parent 5c514ebda66a733144b8f6318dc716612de6b28a If client tries to use unknown list-extended options, fail with BAD. diff -r 5c514ebda66a -r a249d916f6e6 src/imap/cmd-list.c --- 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++; }