dovecot-2.2: lib-storage: Avoid creating shared user for an empt...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 10 05:24:41 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/ec5c630012cd
changeset: 14816:ec5c630012cd
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 31 18:33:45 2012 +0300
description:
lib-storage: Avoid creating shared user for an empty username.

diffstat:

 src/lib-storage/index/shared/shared-list.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r c598f76eeeed -r ec5c630012cd src/lib-storage/index/shared/shared-list.c
--- a/src/lib-storage/index/shared/shared-list.c	Sat Jul 28 20:31:30 2012 +0300
+++ b/src/lib-storage/index/shared/shared-list.c	Tue Jul 31 18:33:45 2012 +0300
@@ -135,7 +135,8 @@
 	else
 		ns_ref = NULL;
 
-	if (ns_ref != NULL && shared_storage_get_namespace(&ns, &ns_ref) == 0)
+	if (ns_ref != NULL && *ns_ref != '\0' &&
+	    shared_storage_get_namespace(&ns, &ns_ref) == 0)
 		return mailbox_list_join_refpattern(ns->list, ref, pattern);
 
 	/* fallback to default behavior */


More information about the dovecot-cvs mailing list