svn commit: r507181 - in head/mail/dovecot: . files

Larry Rosenman ler at FreeBSD.org
Mon Jul 22 23:17:55 UTC 2019


Author: ler
Date: Mon Jul 22 23:17:54 2019
New Revision: 507181
URL: https://svnweb.freebsd.org/changeset/ports/507181

Log:
  mail/dovecot: [PATCH] lib-storage: Namespace prefix shouldn't be included in all
   mailbox name validity checks
  
  Obtained from:	upstream github.

Added:
  head/mail/dovecot/files/patch-src_lib-storage_mail-storage.c   (contents, props changed)
Modified:
  head/mail/dovecot/Makefile

Modified: head/mail/dovecot/Makefile
==============================================================================
--- head/mail/dovecot/Makefile	Mon Jul 22 23:01:47 2019	(r507180)
+++ head/mail/dovecot/Makefile	Mon Jul 22 23:17:54 2019	(r507181)
@@ -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/
 

Added: head/mail/dovecot/files/patch-src_lib-storage_mail-storage.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/mail/dovecot/files/patch-src_lib-storage_mail-storage.c	Mon Jul 22 23:17:54 2019	(r507181)
@@ -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));


More information about the svn-ports-all mailing list