Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mod_mail: Avoid soft assertion caused by trying to stat nonexistent m…
…ailbox. The SUBSCRIBE and UNSUBSCRIBE commands do not require that the referenced mailbox actually exists. In fact, it is common for them not to, in the case of a DELETE (mailbox delete) followed by an UNSUBSCRIBE, which is a common client command sequence. In this case, the mailbox no longer exists by the time of the UNSUBSCRIBE. Rather than trying to retrieve UIDNEXT and UIDVALIDITY for a mailbox that may no longer exists, which will trigger a soft assert since we can't, just don't attempt to at all, which will avoid these invalid accesses in such cases. Even in the case where the mailbox does exist, it's probably not super vital to include this info in the event. A test has been added to capture this, since backtraces cause tests to fail when run with the -e flag (under valgrind) since backtraces leak memory.
- Loading branch information