Mercurial > dovecot > original-hg > dovecot-1.2
diff src/imap/cmd-append.c @ 6353:23c9ac999578 HEAD
mailbox_keywords_create() checks keyword validity now and returns failure if
any of them are invalid. Added mailbox_keywords_create_valid() that only
drops invalid keywords. Removed mbox and IMAP-specific keyword checks, they
all use the same checking now.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 02 Sep 2007 06:10:54 +0300 |
parents | bfb6aeddef9b |
children | 8476d665530f |
line wrap: on
line diff
--- a/src/imap/cmd-append.c Sun Sep 02 06:08:58 2007 +0300 +++ b/src/imap/cmd-append.c Sun Sep 02 06:10:54 2007 +0300 @@ -290,8 +290,13 @@ if (!client_parse_mail_flags(cmd, flags_list, &flags, &keywords_list)) return cmd_append_cancel(ctx, nonsync); - keywords = keywords_list == NULL ? NULL : - mailbox_keywords_create(ctx->t, keywords_list); + if (keywords_list == NULL) + keywords = NULL; + else if (mailbox_keywords_create(ctx->t, keywords_list, + &keywords) < 0) { + client_send_storage_error(cmd, ctx->storage); + return cmd_append_cancel(ctx, nonsync); + } } else { flags = 0; keywords = NULL;