mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-13 16:38:14 +00:00
Fix viewing of encrypted S/MIME messages
* lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): Don't add a content-type header if there already is one (bug#41659).
This commit is contained in:
parent
8bc8565721
commit
96a3b473fa
@ -1680,8 +1680,14 @@ If RECURSIVE, search recursively."
|
|||||||
(t (y-or-n-p
|
(t (y-or-n-p
|
||||||
(format "Decrypt (S/MIME) part? "))))
|
(format "Decrypt (S/MIME) part? "))))
|
||||||
(mm-view-pkcs7 parts from))
|
(mm-view-pkcs7 parts from))
|
||||||
(goto-char (point-min))
|
;; Normally there will be a Content-type header here, but
|
||||||
(insert "Content-type: text/plain\n\n")
|
;; some mailers don't add that to the encrypted part, which
|
||||||
|
;; makes the subsequent re-dissection fail here.
|
||||||
|
(save-restriction
|
||||||
|
(mail-narrow-to-head)
|
||||||
|
(unless (mail-fetch-field "content-type")
|
||||||
|
(goto-char (point-max))
|
||||||
|
(insert "Content-type: text/plain\n\n")))
|
||||||
(setq parts (mm-dissect-buffer t)))))
|
(setq parts (mm-dissect-buffer t)))))
|
||||||
((equal subtype "signed")
|
((equal subtype "signed")
|
||||||
(unless (and (setq protocol
|
(unless (and (setq protocol
|
||||||
|
Loading…
Reference in New Issue
Block a user