Fix line separator in exported messages (#1488603)
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Fix line separator in exported messages (#1488603) |
| | | - Fix XSS issue where plain signatures wasn't secured in HTML mode (#1488613) |
| | | - Fix XSS issue where href="javascript:" wasn't secured (#1488613) |
| | | - Fix impossible to create message with empty plain text part (#1488610) |
| | |
| | | |
| | | /** |
| | | * Sends the whole message source to stdout |
| | | * |
| | | * @param int $uid Message UID |
| | | * @param bool $formatted Enables line-ending formatting |
| | | */ |
| | | public function print_raw_body($uid) |
| | | public function print_raw_body($uid, $formatted = true) |
| | | { |
| | | if (!$this->check_connection()) { |
| | | return; |
| | | } |
| | | |
| | | $this->conn->handlePartBody($this->folder, $uid, true, NULL, NULL, true); |
| | | $this->conn->handlePartBody($this->folder, $uid, true, null, null, true, null, $formatted); |
| | | } |
| | | |
| | | |
| | |
| | | return $this->handlePartBody($mailbox, $id, $is_uid, $part); |
| | | } |
| | | |
| | | function handlePartBody($mailbox, $id, $is_uid=false, $part='', $encoding=NULL, $print=NULL, $file=NULL) |
| | | function handlePartBody($mailbox, $id, $is_uid=false, $part='', $encoding=NULL, $print=NULL, $file=NULL, $formatted=true) |
| | | { |
| | | if (!$this->select($mailbox)) { |
| | | return false; |
| | |
| | | continue; |
| | | $line = convert_uudecode($line); |
| | | // default |
| | | } else { |
| | | } else if ($formatted) { |
| | | $line = rtrim($line, "\t\r\n\0\x0B") . "\n"; |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * Sends the whole message source to stdout |
| | | * |
| | | * @param int $uid Message UID |
| | | * @param bool $formatted Enables line-ending formatting |
| | | */ |
| | | abstract function print_raw_body($uid); |
| | | abstract function print_raw_body($uid, $formatted = true); |
| | | |
| | | |
| | | /** |
| | |
| | | header("Content-Disposition: attachment; filename=\"$filename\""); |
| | | } |
| | | |
| | | $RCMAIL->storage->print_raw_body($uid); |
| | | $RCMAIL->storage->print_raw_body($uid, empty($_GET['_save'])); |
| | | } |
| | | else |
| | | { |