summaryrefslogtreecommitdiffstats
path: root/extensions/SecureMail
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2014-12-05 23:46:59 +0100
committerDavid Lawrence <dkl@mozilla.com>2014-12-05 23:47:30 +0100
commit66da5aeeaf1b14f70864cc19940ca188e6341528 (patch)
tree2c82542e531c1a89be3a7e87ec3705b612466db9 /extensions/SecureMail
parent57c99986924bfebb7ad044ec1753220d1ff243cc (diff)
downloadbugzilla-66da5aeeaf1b14f70864cc19940ca188e6341528.tar.gz
bugzilla-66da5aeeaf1b14f70864cc19940ca188e6341528.tar.xz
Bug 829358: Changing the name of a private attachment in an unhidden bug results in the name change being sent unencrypted
Diffstat (limited to 'extensions/SecureMail')
-rw-r--r--extensions/SecureMail/Extension.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/SecureMail/Extension.pm b/extensions/SecureMail/Extension.pm
index 90fafc06f..a8299860c 100644
--- a/extensions/SecureMail/Extension.pm
+++ b/extensions/SecureMail/Extension.pm
@@ -327,9 +327,9 @@ sub mailer_before_send {
}
# Encrypt if updating a private attachment without a comment
if ($email->header('X-Bugzilla-Changed-Fields')
- && $email->header('X-Bugzilla-Changed-Fields') =~ /Attachment #(\d+)/)
+ && $email->header('X-Bugzilla-Attach-ID'))
{
- my $attachment = Bugzilla::Attachment->new($1);
+ my $attachment = Bugzilla::Attachment->new($email->header('X-Bugzilla-Attach-ID'));
if ($attachment && $attachment->isprivate) {
$make_secure = SECURE_BODY;
}