summaryrefslogtreecommitdiffstats
path: root/extensions/SecureMail
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-08-24 20:37:42 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-08-24 20:37:42 +0200
commitddf7357433a8492a6bcd9c6545407cfd4fb26456 (patch)
tree660f3f424a68fec103be7ba852e640c7ef86e108 /extensions/SecureMail
parent76b27fd6c9bcf9f0bcbcd8280f937192803f8dbc (diff)
downloadbugzilla-ddf7357433a8492a6bcd9c6545407cfd4fb26456.tar.gz
bugzilla-ddf7357433a8492a6bcd9c6545407cfd4fb26456.tar.xz
Bug 785219 - Secure bugmail no longer includes subject of bug
- Missing subject for single part emails as well
Diffstat (limited to 'extensions/SecureMail')
-rw-r--r--extensions/SecureMail/Extension.pm10
1 files changed, 8 insertions, 2 deletions
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));
}
}