#1484467: fix problems with backslash as imap hierarchy delimiter
| | |
| | | CHANGELOG RoundCube Webmail |
| | | --------------------------- |
| | | |
| | | 2009/01/18 (alec) |
| | | ---------- |
| | | - Fix problems with backslash as IMAP hierarchy delimiter (#1484467) |
| | | |
| | | 2009/01/15 (alec) |
| | | ---------- |
| | | - Allow absolute URLs to images in HTML messages/sigs (#1485666) |
| | |
| | | */ |
| | | function save_message($mbox_name, &$message) |
| | | { |
| | | $mbox_name = stripslashes($mbox_name); |
| | | $mailbox = $this->_mod_mailbox($mbox_name); |
| | | |
| | | // make sure mailbox exists |
| | |
| | | */ |
| | | function move_message($uids, $to_mbox, $from_mbox='') |
| | | { |
| | | $to_mbox_in = stripslashes($to_mbox); |
| | | $from_mbox = stripslashes($from_mbox); |
| | | $to_mbox = $this->_mod_mailbox($to_mbox_in); |
| | | $to_mbox = $this->_mod_mailbox($to_mbox); |
| | | $from_mbox = $from_mbox ? $this->_mod_mailbox($from_mbox) : $this->mailbox; |
| | | |
| | | // make sure mailbox exists |
| | |
| | | */ |
| | | function delete_message($uids, $mbox_name='') |
| | | { |
| | | $mbox_name = stripslashes($mbox_name); |
| | | $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; |
| | | |
| | | // convert the list of uids to array |
| | |
| | | */ |
| | | function clear_mailbox($mbox_name=NULL) |
| | | { |
| | | $mbox_name = stripslashes($mbox_name); |
| | | $mailbox = !empty($mbox_name) ? $this->_mod_mailbox($mbox_name) : $this->mailbox; |
| | | $msg_count = $this->_messagecount($mailbox, 'ALL'); |
| | | |
| | |
| | | */ |
| | | function expunge($mbox_name='', $clear_cache=TRUE) |
| | | { |
| | | $mbox_name = stripslashes($mbox_name); |
| | | $mailbox = $mbox_name ? $this->_mod_mailbox($mbox_name) : $this->mailbox; |
| | | return $this->_expunge($mailbox, $clear_cache); |
| | | } |
| | |
| | | { |
| | | $result = FALSE; |
| | | |
| | | // replace backslashes |
| | | $name = preg_replace('/[\\\]+/', '-', $name); |
| | | |
| | | // reduce mailbox name to 100 chars |
| | | $name = substr($name, 0, 100); |
| | | |
| | |
| | | { |
| | | $result = FALSE; |
| | | |
| | | // replace backslashes |
| | | $name = preg_replace('/[\\\]+/', '-', $new_name); |
| | | |
| | | // encode mailbox name and reduce it to 100 chars |
| | | $name = substr($new_name, 0, 100); |
| | | |
| | |
| | | - Removed some debuggers (echo ...) |
| | | File altered by Aleksander Machniak <alec@alec.pl> |
| | | - trim(chop()) replaced by trim() |
| | | - added iil_Escape() with support for " and \ in folder names |
| | | - added iil_Escape()/iil_UnEscape() with support for " and \ in folder names |
| | | - support \ character in username in iil_C_Login() |
| | | - fixed iil_MultLine(): use iil_ReadBytes() instead of iil_ReadLine() |
| | | - fixed iil_C_FetchStructureString() to handle many literal strings in response |
| | |
| | | return strtr($string, array('"'=>'\\"', '\\' => '\\\\')); |
| | | } |
| | | |
| | | function iil_UnEscape($string) |
| | | { |
| | | return strtr($string, array('\\"'=>'"', '\\\\' => '\\')); |
| | | } |
| | | |
| | | function iil_C_GetCapability(&$conn, $name) |
| | | { |
| | | if (in_array($name, $conn->capability)) { |
| | |
| | | $line = iil_ReadLine($conn->fp, 1024); |
| | | if (iil_StartsWith($line, '* NAMESPACE')) { |
| | | $i = 0; |
| | | $line = iil_UnEscape($line); |
| | | $data = iil_ParseNamespace2(substr($line,11), $i, 0, 0); |
| | | } |
| | | } while (!iil_StartsWith($line, 'ns1', true)); |
| | |
| | | $line=iil_ReadLine($fp, 500); |
| | | if ($line[0] == '*') { |
| | | $line = rtrim($line); |
| | | $a=iil_ExplodeQuotedString(' ', $line); |
| | | $a=iil_ExplodeQuotedString(' ', iil_UnEscape($line)); |
| | | if ($a[0] == '*') { |
| | | $delimiter = str_replace('"', '', $a[count($a)-2]); |
| | | } |
| | |
| | | if (strlen($delimiter)>0) { |
| | | return $delimiter; |
| | | } |
| | | |
| | | |
| | | //if that fails, try namespace extension |
| | | //try to fetch namespace data |
| | | iil_PutLine($conn->fp, "ns1 NAMESPACE"); |
| | |
| | | $line = iil_ReadLine($conn->fp, 1024); |
| | | if (iil_StartsWith($line, '* NAMESPACE')) { |
| | | $i = 0; |
| | | $line = iil_UnEscape($line); |
| | | $data = iil_ParseNamespace2(substr($line,11), $i, 0, 0); |
| | | } |
| | | } while (!iil_StartsWith($line, 'ns1', true)); |