[Tickets #9213] Left pane menu crash when no folder on imap server
bugs at horde.org
bugs at horde.org
Wed Sep 1 19:22:54 UTC 2010
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/9213
------------------------------------------------------------------------------
Ticket | 9213
Created By | luc.germain at usherbrooke.ca
Summary | Left pane menu crash when no folder on imap server
Queue | IMP
Version | 4.3.7
Type | Bug
State | Unconfirmed
Priority | 2. Medium
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
luc.germain at usherbrooke.ca (2010-09-01 15:22) wrote:
When a user has no folder in his account on our IMAP server (cyrus
2.2), the menu in the left frame does not show up; in fact, the
request in this frame is crashing.
Digging down the code, I found out the cause is how IMP treat the
answer to the NAMESPACE imap command. When the user has at least on
folder, the NAMESPACE command return the following:
NAMESPACE (("" "/")) NIL (("[Shared]/" "/"))
But when there is no folder (other than INBOX), the NAMESPACE command return:
NAMESPACE NIL NIL (("[Shared]/" "/"))
The way this is treated in IMP cause an entry "imp" to be inserted as
a child in the "imp" section of the menu tree, and later cause an
infinite loop when walking the menu tree, and PHP crash due to memory
exhaustion.
I temporarily patched the horde/imp/lib/IMAP/Client.php file at line
603 to replace
'NAMESPACE NIL '
by
'NAMESPACE (("" "/")) '
when found in the result of the NAMESPACE command, but IMP should be
able to manage the returned value
NAMESPACE NIL NIL (("[Shared]/" "/"))
correctly (as it IS a valid answer!)
I tried to make a better fix, but the code that builds the menu tree
is a bit too complex for me...
More information about the bugs
mailing list