diff options
author | Aleksander Machniak <alec@alec.pl> | 2021-11-03 10:16:52 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2021-11-03 10:17:27 +0300 |
commit | f8426f5334b655206aaba4a158b9c8ff7961d30a (patch) | |
tree | 566d4f27f4b73ff021f13ff3c554abee917fb34c | |
parent | 80b453c24abd08921c8f17aff9f3d5facaa15fc6 (diff) |
Fix fetching headers of multiple message parts at once in rcube_imap_generic::fetchMIMEHeaders() (#8282)
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | program/lib/Roundcube/rcube_imap_generic.php | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index ddc1a7ce6..73fc7b1be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ - Fix bug where adding a contact to trusted senders via "Always allow from..." button didn't work (#8264, #8268) - Fix bug with show_images setting where option 1 and 3 were swapped (#8268) - Fix PHP fatal error on an undefined constant in contacts import action (#8277) +- Fix fetching headers of multiple message parts at once in rcube_imap_generic::fetchMIMEHeaders() (#8282) ## Release 1.5.0 diff --git a/program/lib/Roundcube/rcube_imap_generic.php b/program/lib/Roundcube/rcube_imap_generic.php index f825709c7..8f1285368 100644 --- a/program/lib/Roundcube/rcube_imap_generic.php +++ b/program/lib/Roundcube/rcube_imap_generic.php @@ -2804,10 +2804,9 @@ class rcube_imap_generic do { $line = $this->readLine(1024); - if (preg_match('/^\* [0-9]+ FETCH [0-9UID( ]+/', $line, $m)) { $line = ltrim(substr($line, strlen($m[0]))); - while (preg_match('/^BODY\[([0-9\.]+)\.'.$type.'\]/', $line, $matches)) { + while (preg_match('/^\s*BODY\[([0-9\.]+)\.'.$type.'\]/', $line, $matches)) { $line = substr($line, strlen($matches[0])); $result[$matches[1]] = trim($this->multLine($line)); $line = $this->readLine(1024); |