diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-04-08 06:27:28 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-04-08 06:27:28 +0000 |
| commit | cc7401827a0e3345c83db7756b6748d0042fc176 (patch) | |
| tree | 02ad7f043b9ab73ad6aa33d43fcec3c62c7af434 /roundcubemail | |
| parent | a79cd8a21e109a21bb6fe117db0c9f5a8e41e419 (diff) | |
- Added workaround for some IMAP server with broken STATUS response (#1487859)
git-svn-id: https://svn.roundcube.net/trunk@4634 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/CHANGELOG | 1 | ||||
| -rw-r--r-- | roundcubemail/program/include/rcube_imap_generic.php | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG index e52b9730b..11b11fc00 100644 --- a/roundcubemail/CHANGELOG +++ b/roundcubemail/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Added workaround for some IMAP server with broken STATUS response (#1487859) - Fix bug where default_charset was not used for text messages (#1487836) - Enable TinyMCE's contextmenu (#1487014) - TinyMCE 3.4.1 diff --git a/roundcubemail/program/include/rcube_imap_generic.php b/roundcubemail/program/include/rcube_imap_generic.php index b4479d619..932ec638d 100644 --- a/roundcubemail/program/include/rcube_imap_generic.php +++ b/roundcubemail/program/include/rcube_imap_generic.php @@ -953,6 +953,16 @@ class rcube_imap_generic list($mbox, $items) = $this->tokenizeResponse($response, 2); + // Fix for #1487859. Some buggy server returns not quoted + // folder name with spaces. Let's try to handle this situation + if (!is_array($items) && ($pos = strpos($response, '(')) !== false) { + $response = substr($response, $pos); + $items = $this->tokenizeResponse($response, 1); + if (!is_array($items)) { + return $result; + } + } + for ($i=0, $len=count($items); $i<$len; $i += 2) { $result[$items[$i]] = (int) $items[$i+1]; } |
