Projects
Kolab:16:Testing:Candidate
cyrus-imapd-3
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 15
View file
cyrus-imapd.spec
Changed
@@ -62,6 +62,8 @@ Patch14: 0002-Ignore-broken-and-missing-sieve-scripts-during-repli.patch Patch15: 0001-Fixed-crash-on-0-pointer-access-in-mupdate.c.patch Patch16: 0001-Backwards-compatibility-for-the-sync-protocol-withou.patch +Patch17: 0001-Quote-values-when-proxying-SETMETADATA.patch +Patch18: 0002-Fixed-GETMETADATA-parsing.patch Source10: cyrus-imapd.logrotate
View file
0001-Quote-values-when-proxying-SETMETADATA.patch
Added
@@ -0,0 +1,33 @@ +From aef13b60b3911b29aefc2d657091b8b40bd41fa5 Mon Sep 17 00:00:00 2001 +From: Christian Mollekopf <mollekopf@apheleia-it.ch> +Date: Thu, 18 May 2023 13:53:21 +0200 +Subject: PATCH 1/2 Quote values when proxying SETMETADATA + +The value event.default was not quoted, which fails to be parsed (I'm +not actually sure it needs to be quoted according to rfc). +We now simply always quote key and value, which seems to do the trick. +--- + imap/imap_proxy.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/imap/imap_proxy.c b/imap/imap_proxy.c +index a622d4a74..14de79732 100644 +--- a/imap/imap_proxy.c ++++ b/imap/imap_proxy.c +@@ -1491,9 +1491,13 @@ int annotate_store_proxy(const char *server, const char *mbox_pat, + buf_appendcstr(&entrybuf, e->entry); + + /* Print the entry-value pair */ ++ prot_putc('"', be->out); + prot_printamap(be->out, entrybuf.s, entrybuf.len); ++ prot_putc('"', be->out); + prot_putc(' ', be->out); ++ prot_putc('"', be->out); + prot_printamap(be->out, av->value.s, av->value.len); ++ prot_putc('"', be->out); + + if (av->next) prot_putc(' ', be->out); + } +-- +2.40.0 +
View file
0002-Fixed-GETMETADATA-parsing.patch
Added
@@ -0,0 +1,72 @@ +From 9a27d175b594f5315437ad7701f87bb643ec82fc Mon Sep 17 00:00:00 2001 +From: Christian Mollekopf <mollekopf@apheleia-it.ch> +Date: Thu, 18 May 2023 14:52:04 +0200 +Subject: PATCH 2/2 Fixed GETMETADATA parsing + +THe previous implementation broken when requesting multiple metadata +items (/shared/vendor/foo /private/vendor/foo). +I assume this breaks GETANNOTATION and it may not work in the cases that +the parsing in imap.c handles, but at least the basics work. +--- + imap/imap_proxy.c | 34 +++++++++++++++++++--------------- + 1 file changed, 19 insertions(+), 15 deletions(-) + +diff --git a/imap/imap_proxy.c b/imap/imap_proxy.c +index 14de79732..4e0db8821 100644 +--- a/imap/imap_proxy.c ++++ b/imap/imap_proxy.c +@@ -1409,7 +1409,7 @@ int annotate_fetch_proxy(const char *server, const char *mbox_pat, + const strarray_t *attribute_pat) + { + struct backend *be; +- int i, j; ++ int i; + char mytag128; + + assert(server && mbox_pat && entry_pat && attribute_pat); +@@ -1422,24 +1422,28 @@ int annotate_fetch_proxy(const char *server, const char *mbox_pat, + /* Send command to remote */ + proxy_gentag(mytag, sizeof(mytag)); + prot_printf(be->out, "%s GETMETADATA \"%s\" (", mytag, mbox_pat); ++ ++ if (entry_pat->count != attribute_pat->count) { ++ syslog(LOG_ERR, "Number of scopes and entries must match"); ++ return IMAP_INTERNAL; ++ } ++ + for (i = 0; i < entry_pat->count; i++) { + const char *entry = strarray_nth(entry_pat, i); +- +- for (j = 0; j < attribute_pat->count; j++) { +- const char *scope, *attr = strarray_nth(attribute_pat, j); +- if (!strcmp(attr, "value.shared")) { +- scope = "/shared"; +- } +- else if (!strcmp(attr, "value.priv")) { +- scope = "/private"; +- } +- else { +- syslog(LOG_ERR, "won't get deprecated annotation attribute %s", attr); +- continue; +- } +- prot_printf(be->out, "%s%s%s", i ? " " : "", scope, entry); ++ const char *scope, *attr = strarray_nth(attribute_pat, i); ++ if (!strcmp(attr, "value.shared")) { ++ scope = "/shared"; + } ++ else if (!strcmp(attr, "value.priv")) { ++ scope = "/private"; ++ } ++ else { ++ syslog(LOG_ERR, "won't get deprecated annotation attribute %s", attr); ++ continue; ++ } ++ prot_printf(be->out, "%s%s%s", i ? " " : "", scope, entry); + } ++ + prot_printf(be->out, ")\r\n"); + prot_flush(be->out); + +-- +2.40.0 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.