From ddf7357433a8492a6bcd9c6545407cfd4fb26456 Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Fri, 24 Aug 2012 14:37:42 -0400 Subject: Bug 785219 - Secure bugmail no longer includes subject of bug - Missing subject for single part emails as well --- extensions/SecureMail/Extension.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'extensions/SecureMail') diff --git a/extensions/SecureMail/Extension.pm b/extensions/SecureMail/Extension.pm index 3a774c0e8..28da64358 100644 --- a/extensions/SecureMail/Extension.pm +++ b/extensions/SecureMail/Extension.pm @@ -391,9 +391,9 @@ sub _make_secure { filename => 'encrypted.asc', disposition => 'inline', encoding => '7bit', - }, + }, body => _pgp_encrypt($pgp, $to_encrypt) - ), + ), ); $email->parts_set(\@new_parts); my $new_boundary = $email->{ct}{attributes}{boundary}; @@ -405,6 +405,12 @@ sub _make_secure { "boundary=\"$new_boundary\""); } else { + if ($sanitise_subject) { + if (!is_7bit_clean($subject)) { + $email->encoding_set('quoted-printable'); + } + $email->body_str_set("Subject: $subject\015\012\015\012" . $email->body_str); + } $email->body_set(_pgp_encrypt($pgp, $email->body)); } } -- cgit v1.2.3-24-g4f1b