]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fix NOTIFY to parse more than just the first event-group
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 17 Jun 2017 11:38:22 +0000 (14:38 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Mon, 19 Jun 2017 09:36:01 +0000 (12:36 +0300)
src/imap/cmd-notify.c

index 4c6aad975a3eee480d6f8e99983fed73810fd18a..94cf103b88e1660f5b6b2fe8b7246b12631ac859 100644 (file)
@@ -292,10 +292,10 @@ cmd_notify_set(struct imap_notify_context *ctx, const struct imap_arg *args)
                ctx->send_immediate_status = TRUE;
                args++;
        }
-       for (; args->type != IMAP_ARG_EOL; args++) {
-               if (!imap_arg_get_list(args, &event_group))
-                       return -1;
 
+       if (!imap_arg_get_list(args, &event_group))
+               return -1;
+       for (; event_group->type != IMAP_ARG_EOL; event_group++) {
                /* filter-mailboxes */
                if (!imap_arg_get_atom(event_group, &filter_mailboxes))
                        return -1;