dovecot-1.2: shared mailboxes: Don't crash if trying to open "sh...
dovecot at dovecot.org
dovecot at dovecot.org
Sat May 2 00:07:43 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/4fd7b98bcff9
changeset: 9009:4fd7b98bcff9
user: Timo Sirainen <tss at iki.fi>
date: Fri May 01 17:07:38 2009 -0400
description:
shared mailboxes: Don't crash if trying to open "shared/domain" namespace prefix as mailbox.
diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
src/lib-storage/index/shared/shared-storage.c | 8 +++++++-
diffs (18 lines):
diff -r fc4f65a4ca60 -r 4fd7b98bcff9 src/lib-storage/index/shared/shared-storage.c
--- a/src/lib-storage/index/shared/shared-storage.c Fri May 01 14:56:52 2009 -0400
+++ b/src/lib-storage/index/shared/shared-storage.c Fri May 01 17:07:38 2009 -0400
@@ -193,7 +193,13 @@ int shared_storage_get_namespace(struct
/* successfully matched the name. */
if (userdomain == NULL) {
- i_assert(username != NULL);
+ if (username == NULL) {
+ /* trying to open namespace "shared/domain"
+ namespace prefix. */
+ mail_storage_set_error(_storage, MAIL_ERROR_NOTFOUND,
+ T_MAIL_ERR_MAILBOX_NOT_FOUND(*_name));
+ return -1;
+ }
userdomain = domain == NULL ? username :
t_strconcat(username, "@", domain, NULL);
} else {
More information about the dovecot-cvs
mailing list