diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-11-30 16:16:46 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-11-30 16:16:46 +0100 |
commit | 07ae61fcd3d2ecf7ccf9d6a1267ee0ab5c4c1db2 (patch) | |
tree | fb9bffac9657bb7972083df4afd8cff914d66a25 | |
parent | a38d0bb818e35ae584eb9667e742734f327d1e45 (diff) | |
download | bugzilla-07ae61fcd3d2ecf7ccf9d6a1267ee0ab5c4c1db2.tar.gz bugzilla-07ae61fcd3d2ecf7ccf9d6a1267ee0ab5c4c1db2.tar.xz |
Bug 797226 - A-dependent-bug-changed bugmail on an un-hidden bug sometimes exposes the unobscured summary of a dependent hidden bug
r=glob
-rw-r--r-- | extensions/SecureMail/Extension.pm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/extensions/SecureMail/Extension.pm b/extensions/SecureMail/Extension.pm index 3730d23e6..1ea691320 100644 --- a/extensions/SecureMail/Extension.pm +++ b/extensions/SecureMail/Extension.pm @@ -195,6 +195,29 @@ sub user_preferences { $$handled = 1; } +sub template_before_process { + my ($self, $args) = @_; + my $file = $args->{'file'}; + my $vars = $args->{'vars'}; + + # Bug dependency emails contain the subject of the dependent bug + # right before the diffs when a status has gone from open/closed + # or closed/open. We need to sanitize the subject of change.blocker + # similar to how we do referenced bugs + return unless + $file eq 'email/bugmail.html.tmpl' + || $file eq 'email/bugmail.txt.tmpl'; + + if (defined $vars->{diffs}) { + foreach my $change (@{ $vars->{diffs} }) { + next if !defined $change->{blocker}; + if (grep($_->secure_mail, @{ $change->{blocker}->groups_in })) { + $change->{blocker}->{short_desc} = "(Secure bug)"; + } + } + } +} + sub _send_test_email { my ($user) = @_; my $template = Bugzilla->template_inner($user->settings->{'lang'}->{'value'}); |