summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-06-27 16:27:11 +0000
committeralecpl <alec@alec.pl>2011-06-27 16:27:11 +0000
commit0891b1d2ec6b576000c0fe9150257d4f03c53536 (patch)
tree211c78258a0e8f667e3dad949fa0adccbeee7e31 /program/include
parent44143c5847bac29c7d85406d45487f0b53fa9ba3 (diff)
- Fix handling of untagged responses in LIST/LSUB response parser
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_imap_generic.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php
index 59e314c1a..02211aa79 100644
--- a/program/include/rcube_imap_generic.php
+++ b/program/include/rcube_imap_generic.php
@@ -2180,7 +2180,7 @@ class rcube_imap_generic
while ($this->tokenizeResponse($response, 1) == '*') {
$cmd = strtoupper($this->tokenizeResponse($response, 1));
// * LIST (<options>) <delimiter> <mailbox>
- if (!$lstatus || $cmd == 'LIST' || $cmd == 'LSUB') {
+ if ($cmd == 'LIST' || $cmd == 'LSUB') {
list($opts, $delim, $mailbox) = $this->tokenizeResponse($response, 3);
// Add to result array
@@ -2209,6 +2209,14 @@ class rcube_imap_generic
$folders[$mailbox][$name] = $value;
}
}
+ // other untagged response line, skip it
+ else {
+ $response = ltrim($response);
+ if (($position = strpos($response, "\n")) !== false)
+ $response = substr($response, $position+1);
+ else
+ $response = '';
+ }
}
return $folders;