Mercurial > dovecot > core-2.2
changeset 19468:bc3f0e0c7a67
lib-storage: SEARCH BODY "" wasn't properly being translated to SEARCH_ALL.
Instead if the next parameter was "" this happened (which could have been an
accidental space in doveadm search-query).
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 06 Dec 2015 16:46:30 +0200 |
parents | 00817b01020a |
children | 59a8b0aa6379 |
files | src/lib-storage/mail-search-register-imap.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-search-register-imap.c Sun Dec 06 16:09:55 2015 +0200 +++ b/src/lib-storage/mail-search-register-imap.c Sun Dec 06 16:46:30 2015 +0200 @@ -278,7 +278,7 @@ &sarg->value.str) < 0) return NULL; - if (mail_search_parse_skip_next(ctx->parser, "")) { + if (sarg->value.str[0] == '\0') { /* optimization: BODY "" matches everything (but do this only after checking charset and key are ok) */ return mail_search_build_new(ctx, SEARCH_ALL);