Skip to content

Commit

Permalink
Fix decryption of messages encoded with non-ascii charset (#5962)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Sep 27, 2017
1 parent 0ffd546 commit 5660489
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,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
-------------
Expand Down
5 changes: 5 additions & 0 deletions plugins/enigma/lib/enigma_engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5660489

Please sign in to comment.