From bdbfbd9074bf62d5ddc1f08337f5f2aa78c84711 Mon Sep 17 00:00:00 2001 From: Mathias Schneider Date: Sun, 21 Sep 2025 10:14:24 +0200 Subject: [PATCH] Support early MIME types for S/MIME encrypted messages (#9973) Co-authored-by: Mathias Schneider --- program/js/app.js | 2 +- program/lib/Roundcube/rcube_message.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 5b9ee1db0..e72703f75 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -2530,7 +2530,7 @@ function rcube_webmail() { html = ''; } else if (flags.ctype == 'multipart/report') { html = ''; - } else if (flags.ctype == 'multipart/encrypted' || flags.ctype == 'application/pkcs7-mime') { + } else if (flags.ctype == 'multipart/encrypted' || flags.ctype == 'application/pkcs7-mime' || flags.ctype == 'application/x-pkcs7-mime') { html = ''; } else if (flags.hasattachment || (!flags.hasnoattachment && /application\/|multipart\/(m|signed)/.test(flags.ctype))) { html = ''; diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php index 249dc39a8..83f753c3e 100644 --- a/program/lib/Roundcube/rcube_message.php +++ b/program/lib/Roundcube/rcube_message.php @@ -892,7 +892,7 @@ class rcube_message } } // this is an S/MIME encrypted message -> create a plaintext body with the according message - elseif ($mimetype == 'application/pkcs7-mime') { + elseif ($mimetype == 'application/pkcs7-mime' || $mimetype == 'application/x-pkcs7-mime') { $p = new rcube_message_part(); $p->type = 'content'; $p->ctype_primary = 'text';