FreeBSD Bugzilla – Attachment 183967 Details for
Bug 220397
mail/dovecot2: Fix NOTIFY broken since 2.2.31
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Dovecot2 NOTIFY fix
dovecot-NOTIFY-fix.patch (text/plain), 4.39 KB, created by
VK
on 2017-06-30 21:45:46 UTC
(
hide
)
Description:
Dovecot2 NOTIFY fix
Filename:
MIME Type:
Creator:
VK
Created:
2017-06-30 21:45:46 UTC
Size:
4.39 KB
patch
obsolete
>Index: mail/dovecot2/Makefile >=================================================================== >--- mail/dovecot2/Makefile (revision 444783) >+++ mail/dovecot2/Makefile (working copy) >@@ -14,6 +14,7 @@ > > PORTNAME= dovecot > PORTVERSION= 2.2.31 >+PORTREVISION= 1 > CATEGORIES= mail ipv6 > MASTER_SITES= https://www.dovecot.org/releases/2.2/ > PKGNAMESUFFIX= 2 >Index: mail/dovecot2/files/patch-src_imap_cmd-notify.c >=================================================================== >--- mail/dovecot2/files/patch-src_imap_cmd-notify.c (nonexistent) >+++ mail/dovecot2/files/patch-src_imap_cmd-notify.c (working copy) >@@ -0,0 +1,84 @@ >+NOTIFY was broken since 2.2.31, and this patch reverts that breakage, using two >+upstream commits: >+ >+* https://github.com/dovecot/core/commit/bcb321bc62117d30bc53a872ca1154c0100aeefd >+* https://github.com/dovecot/core/commit/8b2d740b8182c63b76ff7ef0dd5e01710228705a >+ >+From bcb321bc62117d30bc53a872ca1154c0100aeefd Mon Sep 17 00:00:00 2001 >+From: Timo Sirainen <timo.sirainen@dovecot.fi> >+Date: Fri, 30 Jun 2017 17:33:15 +0300 >+Subject: [PATCH] imap: Fix NOTIFY parameter parsing by reverting earlier >+ change >+ >+I misread the RFC and wrote broken tests. >+Reverts 64d2efdc4b0bdf92249840e9db89b91c8dc0f3a3 >+ >+ >+From 8b2d740b8182c63b76ff7ef0dd5e01710228705a Mon Sep 17 00:00:00 2001 >+From: Timo Sirainen <timo.sirainen@dovecot.fi> >+Date: Fri, 30 Jun 2017 17:51:34 +0300 >+Subject: [PATCH] imap: Add more error checking to NOTIFY parameter parsing >+ >+This should make it clearer to realize when invalid syntax is being used >+rather than just ignoring the problem. >+ >+ >+--- src/imap/cmd-notify.c.orig 2017-06-30 21:31:28 UTC >++++ src/imap/cmd-notify.c >+@@ -41,6 +41,8 @@ static int >+ cmd_notify_parse_fetch(struct imap_notify_context *ctx, >+ const struct imap_arg *list) >+ { >++ if (list->type == IMAP_ARG_EOL) >++ return -1; /* at least one attribute must be set */ >+ return imap_fetch_att_list_parse(ctx->client, ctx->pool, list, >+ &ctx->fetch_ctx, &ctx->error); >+ } >+@@ -59,11 +61,17 @@ cmd_notify_set_selected(struct imap_noti >+ strcasecmp(str, "NONE") == 0) { >+ /* no events for selected mailbox. this is also the default >+ when NOTIFY command doesn't specify it explicitly */ >++ if (events[1].type != IMAP_ARG_EOL) >++ return -1; /* no extra parameters */ >+ return 0; >+ } >+ >+ if (!imap_arg_get_list(events, &list)) >+ return -1; >++ if (events[1].type != IMAP_ARG_EOL) >++ return -1; /* no extra parameters */ >++ if (list->type == IMAP_ARG_EOL) >++ return -1; /* at least one event */ >+ >+ for (; list->type != IMAP_ARG_EOL; list++) { >+ if (cmd_notify_parse_event(list, &event) < 0) >+@@ -292,10 +300,10 @@ cmd_notify_set(struct imap_notify_contex >+ 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; >+@@ -322,6 +330,15 @@ cmd_notify_set(struct imap_notify_contex >+ if (event_group->type == IMAP_ARG_EOL) >+ return -1; >+ mailboxes = event_group++; >++ /* check that the mailboxes parameter is valid */ >++ if (IMAP_ARG_IS_ASTRING(mailboxes)) >++ ; >++ else if (!imap_arg_get_list(mailboxes, &list)) >++ return -1; >++ else if (list->type == IMAP_ARG_EOL) { >++ /* should have at least one mailbox */ >++ return -1; >++ } >+ } else { >+ mailboxes = NULL; >+ } >Index: mail/dovecot2-pigeonhole/Makefile >=================================================================== >--- mail/dovecot2-pigeonhole/Makefile (revision 444712) >+++ mail/dovecot2-pigeonhole/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= dovecot-pigeonhole > PORTVERSION= 0.4.19 >+PORTREVISION= 1 > CATEGORIES= mail > MASTER_SITES= http://pigeonhole.dovecot.org/releases/${DOVECOTVERSION}/ > DISTNAME= ${PORTNAME:C/-/-${DOVECOTVERSION}-/}-${PORTVERSION} >Index: mail/dovecot2-antispam-plugin/Makefile >=================================================================== >--- mail/dovecot2-antispam-plugin/Makefile (revision 444712) >+++ mail/dovecot2-antispam-plugin/Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= dovecot2-antispam-plugin > PORTVERSION= 20130429 >-PORTREVISION= 30 >+PORTREVISION= 31 > CATEGORIES= mail > MASTER_SITES= http://olgeni.olgeni.com/~olgeni/distfiles/ \ > LOCAL/olgeni
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
vlad-fbsd
:
maintainer-approval?
(
adamw
)
Actions:
View
|
Diff
Attachments on
bug 220397
: 183967