diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-04-05 18:53:20 +0200 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-04-05 18:53:20 +0200 |
commit | 816e737326fed0671edc48d5710202cd434ad505 (patch) | |
tree | 3affecf1bb3641a1588d77a5f108b835ce89ecec /extensions/SecureMail | |
parent | 1af91f4e7ba3d4bbbb9c821090fd160d11e66fae (diff) | |
download | bugzilla-816e737326fed0671edc48d5710202cd434ad505.tar.gz bugzilla-816e737326fed0671edc48d5710202cd434ad505.tar.xz |
Bug 741996 - approval-mozilla-esr10 flag request mails show real subject for security bugs
r=gerv
Diffstat (limited to 'extensions/SecureMail')
-rw-r--r-- | extensions/SecureMail/Extension.pm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/extensions/SecureMail/Extension.pm b/extensions/SecureMail/Extension.pm index 11a67d5fd..21541f845 100644 --- a/extensions/SecureMail/Extension.pm +++ b/extensions/SecureMail/Extension.pm @@ -227,9 +227,12 @@ sub mailer_before_send { if ($is_bugmail) { # This is also a bit of a hack, but there's no header with the # bug ID in. So we take the first number in the subject. - my ($bug_id) = ($email->header('Subject') =~ /^[^\d]+(\d+)/); + my ($bug_id) = ($email->header('Subject') =~ /\[\D+(\d+)\]/); my $bug = new Bugzilla::Bug($bug_id); - if ($bug && !grep($_->{secure_mail}, @{ $bug->groups_in })) { + if ($bug + && !$bug->{'error'} + && !grep($_->{secure_mail}, @{ $bug->groups_in })) + { $make_secure = 0; } } @@ -262,7 +265,7 @@ sub _make_secure { my ($email, $key, $sanitise_subject) = @_; my $subject = $email->header('Subject'); - my ($bug_id) = $subject =~ /^\D+(\d+)/; + my ($bug_id) = $subject =~ /\[\D+(\d+)\]/; my $key_type = 0; if ($key && $key =~ /PUBLIC KEY/) { |