From 0a12d43e84eb5592c39350432c7a3e8fdaa71a06 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 4 Aug 2020 18:08:47 +0200 Subject: [PATCH] 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). --- lisp/gnus/mm-decode.el | 6 ++++++ 1 file changed, 6 insertions(+) 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. -- 2.39.2