diff options
author | Aleksander Machniak <alec@alec.pl> | 2012-08-15 15:32:02 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2012-08-15 15:32:02 +0200 |
commit | fb2f825cd95677a2ede38e0a2ea99b6823841d74 (patch) | |
tree | 3455473791c3328817ea6f499262f608ce5842ea | |
parent | c086978f6a91eacb339fd2976202fca9dad2ef32 (diff) |
Fix line separator in exported messages (#1488603)
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | program/include/rcube_imap.php | 7 | ||||
-rw-r--r-- | program/include/rcube_imap_generic.php | 4 | ||||
-rw-r--r-- | program/include/rcube_storage.php | 5 | ||||
-rw-r--r-- | program/steps/mail/viewsource.inc | 2 |
5 files changed, 13 insertions, 6 deletions
@@ -1,6 +1,7 @@ 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) diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php index 461ecb0d2..5dd9c1250 100644 --- a/program/include/rcube_imap.php +++ b/program/include/rcube_imap.php @@ -2138,14 +2138,17 @@ class rcube_imap extends rcube_storage /** * 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); } diff --git a/program/include/rcube_imap_generic.php b/program/include/rcube_imap_generic.php index 8d956f2b9..915a11aad 100644 --- a/program/include/rcube_imap_generic.php +++ b/program/include/rcube_imap_generic.php @@ -2377,7 +2377,7 @@ class rcube_imap_generic 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; @@ -2494,7 +2494,7 @@ class rcube_imap_generic continue; $line = convert_uudecode($line); // default - } else { + } else if ($formatted) { $line = rtrim($line, "\t\r\n\0\x0B") . "\n"; } diff --git a/program/include/rcube_storage.php b/program/include/rcube_storage.php index 1075b0f43..768a26d73 100644 --- a/program/include/rcube_storage.php +++ b/program/include/rcube_storage.php @@ -502,8 +502,11 @@ abstract class rcube_storage /** * 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); /** diff --git a/program/steps/mail/viewsource.inc b/program/steps/mail/viewsource.inc index 59ccb386e..c560d7d41 100644 --- a/program/steps/mail/viewsource.inc +++ b/program/steps/mail/viewsource.inc @@ -44,7 +44,7 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_GET)) header("Content-Disposition: attachment; filename=\"$filename\""); } - $RCMAIL->storage->print_raw_body($uid); + $RCMAIL->storage->print_raw_body($uid, empty($_GET['_save'])); } else { |