Browse Source

Fix PHP fatal error when parsing some malformed BODYSTRUCTURE responses (#9689)

dependabot/npm_and_yarn/tinymce-7.5.1
Aleksander Machniak 8 months ago
parent
commit
00ef061ef8
  1. 1
      CHANGELOG.md
  2. 4
      program/lib/Roundcube/rcube_imap.php

1
CHANGELOG.md

@ -67,6 +67,7 @@
- Fix rcube_imap::get_vendor() result (and PHP warning) on Zimbra server (#9650)
- Fix regression causing inline SVG images to be missing in mail preview (#9644)
- Fix plugin "virtuser_file" to handle backward slashes in username (#9668)
- Fix PHP fatal error when parsing some malformed BODYSTRUCTURE responses (#9689)
## Release 1.6.9

4
program/lib/Roundcube/rcube_imap.php

@ -2282,7 +2282,7 @@ class rcube_imap extends rcube_storage
protected function is_attachment_part($part)
{
if (!empty($part[2]) && is_array($part[2]) && empty($part[3])) {
$params = array_map('strtolower', (array) $part[2]);
$params = array_map('strtolower', array_filter($part[2], 'is_string'));
$find = ['name', 'filename', 'name*', 'filename*', 'name*0', 'filename*0', 'name*0*', 'filename*0*'];
// In case of malformed header check disposition. E.g. some servers for
@ -2304,7 +2304,7 @@ class rcube_imap extends rcube_storage
protected function structure_charset($structure)
{
while (is_array($structure)) {
if (is_array($structure[2]) && $structure[2][0] == 'charset') {
if (isset($structure[2]) && is_array($structure[2]) && $structure[2][0] == 'charset') {
return $structure[2][1];
}

Loading…
Cancel
Save