From 5a52cf9cf207e4bec9a50c487902225dfbaa69b1 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 24 May 2001 21:15:04 +0000 Subject: Only write the message up to (but not including) the attached signature 2001-05-24 Jeffrey Stedfast * mail-format.c (try_inline_pgp_sig): Only write the message up to (but not including) the attached signature block. svn path=/trunk/; revision=9967 --- mail/ChangeLog | 5 +++++ mail/mail-format.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index eb394c2aa3..df563ece1f 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2001-05-24 Jeffrey Stedfast + + * mail-format.c (try_inline_pgp_sig): Only write the message up to + (but not including) the attached signature block. + 2001-05-23 Jeffrey Stedfast * mail-callbacks.c (composer_postpone_cb): Don't free the diff --git a/mail/mail-format.c b/mail/mail-format.c index 88caa67ce8..66e90d1e90 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -1174,7 +1174,11 @@ try_inline_pgp_sig (char *start, MailDisplay *md) { CamelCipherValidity *valid = NULL; CamelPgpContext *context; - char *end; + char *end, *pgp_start; + + pgp_start = strstr (start, "-----BEGIN PGP SIGNED MESSAGE-----"); + if (!pgp_start) + return start; end = strstr (start, "-----END PGP SIGNATURE-----"); if (!end) @@ -1204,7 +1208,7 @@ try_inline_pgp_sig (char *start, MailDisplay *md) camel_exception_free (ex); } - mail_text_write (md->html, md->stream, "%.*s", end - start, start); + mail_text_write (md->html, md->stream, "%.*s", pgp_start - start, start); mail_write_authenticity (md, valid); -- cgit