File bcb321bc62117d30bc53a872ca1154c0100aeefd.patch of Package dovecot22.6583

commit bcb321bc62117d30bc53a872ca1154c0100aeefd
Author: Timo Sirainen <timo.sirainen@dovecot.fi>
Date:   Fri Jun 30 17:33:15 2017 +0300

    imap: Fix NOTIFY parameter parsing by reverting earlier change
    
    I misread the RFC and wrote broken tests.
    Reverts 64d2efdc4b0bdf92249840e9db89b91c8dc0f3a3

diff --git a/src/imap/cmd-notify.c b/src/imap/cmd-notify.c
index abba01785..7d3fd60c7 100644
--- a/src/imap/cmd-notify.c
+++ b/src/imap/cmd-notify.c
@@ -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;
openSUSE Build Service is sponsored by