Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2022-01-22 17:31:26 +0300
committerAleksander Machniak <alec@alec.pl>2022-01-22 17:31:26 +0300
commitf546d7216c2cf80d81ccdeb2123c6f9655d09c9d (patch)
treeed60809e7e1fd05622fa9a71edc138baefb23e3b
parentca5ba9550f31394372531e6ac6c5c61c8f6c6399 (diff)
Fix setting HTML mode on reply/forward of a signed message (#8405)
-rw-r--r--CHANGELOG.md1
-rw-r--r--program/lib/Roundcube/rcube_message.php5
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80af735e7..2e48f7202 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -61,6 +61,7 @@
- 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)
+- Fix setting HTML mode on reply/forward of a signed message (#8405)
## Release 1.5.2
diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index 8bd20be10..571198fd1 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -395,8 +395,9 @@ class rcube_message
return true;
}
- $max_delta = $depth - (1 + ($last == 'multipart/alternative' ? 1 : 0));
- $last = !empty($parent->real_mimetype) ? $parent->real_mimetype : $parent->mimetype;
+ $isCompound = $last == 'multipart/alternative' || $last == 'multipart/related';
+ $max_delta = $depth - ($isCompound ? 2 : 1);
+ $last = !empty($parent->real_mimetype) ? $parent->real_mimetype : $parent->mimetype;
if (!preg_match('/^multipart\/(alternative|related|signed|encrypted|mixed)$/', $last)
|| ($last == 'multipart/mixed' && $parent_depth < $max_delta)