Summary | Left pane menu crash when no folder on imap server |
Queue | IMP |
Queue Version | 4.3.8 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | luc.germain (at) usherbrooke (dot) ca |
Created | 09/01/2010 (5398 days ago) |
Due | |
Updated | 10/21/2010 (5348 days ago) |
Assigned | 10/01/2010 (5368 days ago) |
Resolved | 10/21/2010 (5348 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Feedback
Version ⇒ 4.3.8
able to reproduce a bunch of error messages (but only if all virtual
folders were turned off).
Bug: 9213Make there is always namespace info for INBOX.
http://cvs.horde.org/diff.php/imp/lib/IMP.php?rt=horder1=1.449.4.129r2=1.449.4.130ty=u
tree, the first element of the namespaces array (for the type
"personal") is still missing, and this is what seems to be causing the
infinite loop.
Assigned to Michael Slusarz
Bug: 9213It is possible that the INBOX value may be removed if the server does not
return INBOX in its folder listing.
http://cvs.horde.org/diff.php/imp/lib/IMAP/Tree.php?rt=horder1=1.25.2.71r2=1.25.2.72ty=u
obtained when I have no folders (other than INBOX).
- print_r of the result of "$this->_runCommand('NAMESPACE');" from
imp/lib/IMAP/Client.php
IMAP_CLIENT readNamespaces: stdClass Object
(
[response] => OK
[message] => NAMESPACE NIL NIL (("Shared/" "/"))
[type] => 1
)
- print_r of "$this->_namespaces" in function init() from
imp/lib/IMAP/Tree.php
(
[Shared/] => Array
(
[name] => Shared/
[delimiter] => /
[type] => shared
[hidden] =>
)
)
=> note that there is no "[type] => personal" section in the array
- print_r of "$this->_tree" just before leaving init() in
imp/lib/IMAP/Tree.php
(
[%] => Array
(
[a] => 64
[v] => %
)
)
=> note: there is no [INBOX] element...
- print_r of $tree_ob just before foreach($tree_ob[0], ...
(
[0] => Array
(
[0] => Array
(
[display] =>
[peek] =>
)
)
[1] => Array
(
)
[2] => Array
(
[0] =>
)
)
=> no [value]...
Hope this help.
State ⇒ Feedback
Priority ⇒ 1. Low
because this would require inserting a mailbox with a blank value.
See imp/lib/Block/tree_folders.php:86:
$tree->addNode($parent . $val['value'], ...);
$parent should be 'imp' here, $val['value'] is the mailbox name being added.
What entry for you has an empty $val['value'] value?
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Left pane menu crash when no folder on imap server
Type ⇒ Bug
Priority ⇒ 2. Medium
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...