Summary | IMAP_Tree _getList recurse and die with faulty @imap_getmailboxes() |
Queue | IMP |
Queue Version | 4.1.3 |
Type | Bug |
State | Duplicate |
Priority | 2. Medium |
Owners | |
Requester | ntai (at) smartfruit (dot) com |
Created | 02/03/2007 (6790 days ago) |
Due | |
Updated | 10/09/2009 (5811 days ago) |
Assigned | |
Resolved | 02/09/2007 (6784 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
Ticket 4987.State ⇒ Duplicate
Ticket 4987.State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ IMAP_Tree _getList recurse and die with faulty @imap_getmailboxes()
Queue ⇒ IMP
get the children of folder encounters a folder that returns the name
of folder.
The IMAP server is my Cyrus, and the folder is called "SharedFolders"
which is designated for the shared folders.
In this particular case, expanding a folder "SharedFolder" resuled
"SharedFolder/mailing-lists", "SharedFolder/Records", and
"SharedFolder".
This may be a bug of @imap_getmailboxes(). Anyhow, I did in _getList()
if ($box->name && !isset($unique[$box->name])) {
if ( ($box->name . '/%') != $path) {
$unique[$box->name] = $box;
}
}
to filter out $path when it's returned from @imap_getmailboxes() in
_getList().
Without the hack, it recurses and dies.
I did not chase down @imap_getmailboxes(). For me, I'm happy with the
result as IMP now functions. But, if someone is seeing a similar
problem, I think this is worth reporting.
You can decide IMAP_Tree::_getList() or @imap_getmailboxes() is at
fault. But, moral equivalent of hack in _getList() maybe a good
insurance to have nonetheless.