Skip to content

Commit 06f14f5

Browse files
committed
Fix displaying message/rfc822 parts
The previous code contained a simple error that assigned the body part to the $headers variable (which then couldn't be parsed and got discarded).
1 parent 6e216b5 commit 06f14f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

program/lib/Roundcube/rcube_message.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,10 @@ private function parse_structure($structure, $recursive = false)
663663

664664
// parse headers from message/rfc822 part
665665
if (!isset($structure->headers['subject']) && !isset($structure->headers['from'])) {
666-
$part_body = $headers = $this->get_part_body($structure->mime_id, false, 32768);
666+
$part_body = $this->get_part_body($structure->mime_id, false, 32768);
667667

668-
if (($pos = strpos($headers, "\r\n\r\n")) !== false) {
669-
$headers = substr($headers, $pos);
668+
if (strpos($part_body, "\r\n\r\n") !== false) {
669+
[$headers] = explode("\r\n\r\n", $part_body, 2);
670670
}
671671

672672
$structure->headers = rcube_mime::parse_headers($headers);

0 commit comments

Comments
 (0)