From: Lars Ingebrigtsen Date: Tue, 4 Aug 2020 16:08:47 +0000 (+0200) Subject: Fix viewing encrypted+signed messages from Outlook X-Git-Tag: emacs-28.0.90~6830 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0a12d43e84eb5592c39350432c7a3e8fdaa71a06;p=emacs.git Fix viewing encrypted+signed messages from Outlook * lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): Fix problem with CRLF-encoded encrypted+signed parts (bug#42637). --- diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 587c4e01b92..7f8ab5f9ef5 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -1680,6 +1680,12 @@ If RECURSIVE, search recursively." (t (y-or-n-p (format "Decrypt (S/MIME) part? ")))) (mm-view-pkcs7 parts from)) + (goto-char (point-min)) + ;; The encrypted document is a MIME part, and may use either + ;; CRLF (Outlook and the like) or newlines for end-of-line + ;; markers. Translate from CRLF. + (while (search-forward "\r\n" nil t) + (replace-match "\n")) ;; Normally there will be a Content-type header here, but ;; some mailers don't add that to the encrypted part, which ;; makes the subsequent re-dissection fail here.