Browse Source

Fix bug where small message/rfc822 parts could not be decoded (#8408)

pull/8416/head
Aleksander Machniak 4 years ago
parent
commit
ca5ba9550f
  1. 1
      CHANGELOG.md
  2. 3
      program/lib/Roundcube/rcube_message.php

1
CHANGELOG.md

@ -60,6 +60,7 @@
- Fix so PHP warnings are ignored when resizing a malformed image attachment (#8387)
- Fix various PHP8 warnings (#8392)
- Fix mail headers injection via the subject field on mail compose (#8404)
- Fix bug where small message/rfc822 parts could not be decoded (#8408)
## Release 1.5.2

3
program/lib/Roundcube/rcube_message.php

@ -615,7 +615,8 @@ class rcube_message
// For small text messages we can optimize, so an additional FETCH is not needed
if ($structure->size < 32768 && count($structure->parts) == 1 && $structure->parts[0]->ctype_primary == 'text') {
$structure->parts[0]->body = $body;
$encoding = $structure->headers['content-transfer-encoding'] ?? '7bit';
$structure->parts[0]->body = rcube_mime::decode($body, $encoding);
}
}
}

Loading…
Cancel
Save