dovecot-2.0: shared mailboxes: Don't crash if trying to open "sh...
dovecot at dovecot.org
dovecot at dovecot.org
Sat May 2 00:07:53 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/45ab7d730968
changeset: 9199:45ab7d730968
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 f5eb54133c9d -r 45ab7d730968 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