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-03-13 19:11:43 +0300
committerAleksander Machniak <alec@alec.pl>2022-03-13 19:11:43 +0300
commit13e863e22350235e7d78e31664b6158f3f538760 (patch)
tree4680e409b80ba378fb5b09c9fa594614fef09f2a
parent18f1a33fccbbe3edd8750bc1b71257eb3519c2c3 (diff)
Enigma: Fix double quoted-printable encoding of pgp-signed messages with no attachments (#8413)
-rw-r--r--CHANGELOG.md1
-rw-r--r--plugins/enigma/lib/enigma_mime_message.php6
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12e4e8ddc..2e026e67d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@
- Update to jQuery-UI 1.13.1 (#8455)
- Fix bug where SMTP password didn't work if it contained '%p' (#8435)
- Enigma: Fix initial synchronization of private keys
+- Enigma: Fix double quoted-printable encoding of pgp-signed messages with no attachments (#8413)
- Fix handling of message/rfc822 parts that are small and are multipart structures with a single part (#8458)
- Fix bug where session could time out if DB and PHP timezone were different (#8303)
diff --git a/plugins/enigma/lib/enigma_mime_message.php b/plugins/enigma/lib/enigma_mime_message.php
index c38153b91..4905a780b 100644
--- a/plugins/enigma/lib/enigma_mime_message.php
+++ b/plugins/enigma/lib/enigma_mime_message.php
@@ -189,10 +189,14 @@ class enigma_mime_message extends Mail_mime
$headers = $this->message->headers();
$params = ['content_type' => $headers['Content-Type']];
- if ($headers['Content-Transfer-Encoding']
+ if (!empty($headers['Content-Transfer-Encoding'])
&& stripos($headers['Content-Type'], 'multipart') === false
) {
$params['encoding'] = $headers['Content-Transfer-Encoding'];
+
+ // For plain text body we have to decode it back, to prevent from
+ // a double encoding issue (#8413)
+ $this->body = rcube_mime::decode($this->body, $this->build_params['text_encoding']);
}
$message->addSubpart($this->body, $params);