diff --git a/CHANGELOG b/CHANGELOG index d9713d52bc7..0d51b277904 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,7 @@ CHANGELOG Roundcube Webmail - Fix invalid template loading on a message error in preview frame (#5941) - Fix bug where HTML messages could have been rendered empty on some systems (#5957) - Fix wording of "Mark previewed messages as read" to "Mark messages as read" (#5952) +- Enigma: Fix decryption of messages encoded with non-ascii charset (#5962) RELEASE 1.3.1 ------------- diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php index 68908450f3e..e0bd8bc2745 100644 --- a/plugins/enigma/lib/enigma_engine.php +++ b/plugins/enigma/lib/enigma_engine.php @@ -1196,6 +1196,11 @@ private function get_part_body($msg, $part) } else { $body = $msg->get_part_body($part->mime_id, false); + + // Convert charset to get rid of possible non-ascii characters (#5962) + if ($part->charset && stripos($part->charset, 'ASCII') === false) { + $body = rcube_charset::convert($body, $part->charset, 'US-ASCII'); + } } return $body;