* gnus PGP signature bug and fix
@ 2006-02-03 12:10 Max Froumentin
0 siblings, 0 replies; only message in thread
From: Max Froumentin @ 2006-02-03 12:10 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]
[resending, as my original post never made it to the group]
Gnus (latest CVS) generates wrong MIME encoded messages
when an inline PGP signature is included along with an attachment.
When a multipart message is sent, gnus builds a buffer by adding each
part sequentially, top to bottom. But there's a bug with the code that
generates inline signed parts: the point is not moved back to the bottom of
the buffer, and so the following parts are inserted at the wrong place.
A fix is simple: after each part is generated, move the point back to
the end. i.e, in mml.el, around line 590, where it iterates over each
part, inserting a separator between each part and at the end.
(let ((cont cont) part)
(while (setq part (pop cont))
;; Skip `multipart' and attributes.
(when (and (consp part) (consp (cdr part)))
(insert "\n--" mml-boundary "\n")
(mml-generate-mime-1 part))))
(insert "\n--" mml-boundary "--\n")))))
Just insert "(goto-char (point-max))" after the call to mml-generate-mime-1:
(let ((cont cont) part)
(while (setq part (pop cont))
;; Skip `multipart' and attributes.
(when (and (consp part) (consp (cdr part)))
(insert "\n--" mml-boundary "\n")
(mml-generate-mime-1 part)
(goto-char (point-max)))))
(insert "\n--" mml-boundary "--\n")))))
I've tried it on various messages containing various attachments and it
seems to do the trick. A diff against mml.el 7.40 is attached.
Max.
[-- Attachment #2: mml-7.40.diff --]
[-- Type: text/plain, Size: 124 bytes --]
592,593c592
< (mml-generate-mime-1 part)
< (goto-char (point-max)))))
---
> (mml-generate-mime-1 part))))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-02-03 12:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-03 12:10 gnus PGP signature bug and fix Max Froumentin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).