From ee7ff9a8a083860d39d011c7e4df30cb63490fb9 Mon Sep 17 00:00:00 2001 From: fallchildren Date: Sat, 4 Apr 2020 01:16:12 +0200 Subject: [PATCH] fix bug #40397 This fixes S/MIME encrypted AND signed mails where in the encrypted pkcs7 envelope is a signed pkcs7 structure. - don't insert Content-type header in front of decrypted content for smime decryption using mm-view-pkcs7 - also check for carriage return in mm-copy-to-buffer --- lisp/gnus/mm-decode.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 96695aabfd..d321fbeaaa 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -759,7 +759,7 @@ MIME-Version header before proceeding." (mb enable-multibyte-characters) beg) (goto-char (point-min)) - (search-forward-regexp "^\n" nil 'move) ;; There might be no body. + (search-forward-regexp "^ ?\n" nil 'move) ;; There might be no body. (setq beg (point)) (with-current-buffer (generate-new-buffer " *mm*") @@ -1681,7 +1681,6 @@ If RECURSIVE, search recursively." (format "Decrypt (S/MIME) part? ")))) (mm-view-pkcs7 parts from)) (goto-char (point-min)) - (insert "Content-type: text/plain\n\n") (setq parts (mm-dissect-buffer t))))) ((equal subtype "signed") (unless (and (setq protocol -- 2.25.2