Mercurial > dovecot > core-2.2
changeset 21902:1a8d0b40e6a4
lib-storage: Return empty value in imapc_list_get_storage_name on auth error
Avoids clobbering authentication error.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Wed, 05 Apr 2017 13:27:57 +0300 |
parents | a44b05748869 |
children | d67d1a1edae0 |
files | src/lib-storage/index/imapc/imapc-list.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-list.c Wed Apr 05 12:48:31 2017 +0300 +++ b/src/lib-storage/index/imapc/imapc-list.c Wed Apr 05 13:27:57 2017 +0300 @@ -347,6 +347,11 @@ const char *prefix = list->set->imapc_list_prefix; const char *storage_name; + /* check if authentication has failed, if it has, short circuit here + to avoid the error being clobbered by mailbox_list_get_hierarchy_sep */ + if (list->client->auth_failed) + return ""; + storage_name = mailbox_list_default_get_storage_name(_list, vname); if (*prefix != '\0' && strcasecmp(storage_name, "INBOX") != 0) { storage_name = storage_name[0] == '\0' ? prefix :