summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-08-04 18:08:47 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-08-04 18:08:47 +0200
commit0a12d43e84eb5592c39350432c7a3e8fdaa71a06 (patch)
tree05fc59ed20c22b12c69ef326ac7f6453ece101cd
parent89dbd0838b980f6ef58fa0f614bd743f86ec1c74 (diff)
downloademacs-0a12d43e84eb5592c39350432c7a3e8fdaa71a06.tar.gz
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).
-rw-r--r--lisp/gnus/mm-decode.el6
1 files changed, 6 insertions, 0 deletions
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.