From bb3273ae2f2bc945cb8dbc5d77d16a12fa76d484 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 28 Sep 2002 02:45:50 +0000 Subject: Don't reuse the part that we've signed and/or encrypted, create a new part 2002-09-27 Jeffrey Stedfast * e-msg-composer.c (build_message): Don't reuse the part that we've signed and/or encrypted, create a new part container instead. Fixes bug #31379. svn path=/trunk/; revision=18257 --- composer/ChangeLog | 6 ++++++ composer/e-msg-composer.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index de84b28383..afb4e44054 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,9 @@ +2002-09-27 Jeffrey Stedfast + + * e-msg-composer.c (build_message): Don't reuse the part that + we've signed and/or encrypted, create a new part container + instead. Fixes bug #31379. + 2002-09-25 Dan Winship * e-msg-composer-hdrs.c (create_headers): Use "mail/*" for the diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 24dba9d583..2da8679807 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -526,6 +526,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) mps = camel_multipart_signed_new (); camel_multipart_signed_sign (mps, cipher, part, userid, CAMEL_CIPHER_HASH_SHA1, &ex); camel_object_unref (cipher); + camel_object_unref (part); if (from) camel_object_unref (from); @@ -539,6 +540,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) goto exception; } } else { + part = camel_mime_part_new (); camel_multipart_set_boundary (CAMEL_MULTIPART (mps), NULL); camel_medium_set_content_object (CAMEL_MEDIUM (part), (CamelDataWrapper *) mps); } @@ -599,8 +601,8 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) cipher = mail_crypto_get_pgp_cipher_context (hdrs->account); camel_multipart_encrypted_encrypt (mpe, part, cipher, userid, recipients, &ex); - camel_object_unref (cipher); + camel_object_unref (part); if (from) camel_object_unref (from); @@ -618,6 +620,7 @@ build_message (EMsgComposer *composer, gboolean save_html_object_data) goto exception; } } else { + part = camel_mime_part_new (); camel_multipart_set_boundary (CAMEL_MULTIPART (mpe), NULL); camel_medium_set_content_object (CAMEL_MEDIUM (part), (CamelDataWrapper *) mpe); } -- cgit v1.2.3