aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorLarry Rosenman <ler@FreeBSD.org>2019-07-23 07:17:54 +0800
committerLarry Rosenman <ler@FreeBSD.org>2019-07-23 07:17:54 +0800
commitbbfb58d14f40178e7e23d23e8045a0255931e250 (patch)
treef69db84ac12e06dbecf99ab93cd883e6bfc07514 /mail
parentbeb3a3a14959c8606ad83f5e70699384152c5973 (diff)
downloadfreebsd-ports-gnome-bbfb58d14f40178e7e23d23e8045a0255931e250.tar.gz
freebsd-ports-gnome-bbfb58d14f40178e7e23d23e8045a0255931e250.tar.zst
freebsd-ports-gnome-bbfb58d14f40178e7e23d23e8045a0255931e250.zip
mail/dovecot: [PATCH] lib-storage: Namespace prefix shouldn't be included in all
mailbox name validity checks Obtained from: upstream github.
Diffstat (limited to 'mail')
-rw-r--r--mail/dovecot/Makefile2
-rw-r--r--mail/dovecot/files/patch-src_lib-storage_mail-storage.c35
2 files changed, 36 insertions, 1 deletions
diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile
index 251fb29d1223..4a4f73b9790e 100644
--- a/mail/dovecot/Makefile
+++ b/mail/dovecot/Makefile
@@ -8,7 +8,7 @@
PORTNAME= dovecot
PORTVERSION= 2.3.7
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= mail ipv6
MASTER_SITES= https://dovecot.org/releases/2.3/
diff --git a/mail/dovecot/files/patch-src_lib-storage_mail-storage.c b/mail/dovecot/files/patch-src_lib-storage_mail-storage.c
new file mode 100644
index 000000000000..71204c480d85
--- /dev/null
+++ b/mail/dovecot/files/patch-src_lib-storage_mail-storage.c
@@ -0,0 +1,35 @@
+--- src/lib-storage/mail-storage.c.orig 2019-07-12 10:46:25 UTC
++++ src/lib-storage/mail-storage.c
+@@ -1040,10 +1040,10 @@ mailbox_name_verify_extra_separators(const char *vname
+ }
+
+ static bool
+-mailbox_verify_name_prefix(struct mailbox *box, const char **error_r)
++mailbox_verify_name_prefix(struct mail_namespace *ns, const char **vnamep,
++ const char **error_r)
+ {
+- const char *vname = box->vname;
+- struct mail_namespace *ns = box->list->ns;
++ const char *vname = *vnamep;
+
+ if (ns->prefix_len == 0)
+ return TRUE;
+@@ -1071,6 +1071,7 @@ mailbox_verify_name_prefix(struct mailbox *box, const
+ return FALSE;
+ }
+ }
++ *vnamep = vname;
+ return TRUE;
+ }
+
+@@ -1085,7 +1086,9 @@ int mailbox_verify_name(struct mailbox *box)
+ return 0;
+ }
+
+- if (!mailbox_verify_name_prefix(box, &error)) {
++ /* Verify the namespace prefix here. Change vname to skip the prefix
++ for the following checks. */
++ if (!mailbox_verify_name_prefix(box->list->ns, &vname, &error)) {
+ mail_storage_set_error(box->storage, MAIL_ERROR_PARAMS,
+ t_strdup_printf("Invalid mailbox name '%s': %s",
+ str_sanitize(vname, 80), error));