Skip to content

Commit

Permalink
Fix displaying message/rfc822 parts
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
pabzm committed Jan 15, 2025
1 parent 6e216b5 commit 06f14f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions program/lib/Roundcube/rcube_message.php
Original file line number Diff line number Diff line change
Expand Up @@ -663,10 +663,10 @@ private function parse_structure($structure, $recursive = false)

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

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

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

0 comments on commit 06f14f5

Please sign in to comment.