From 0d547dd6947f1c188a84e67c9aad052109f31b2b Mon Sep 17 00:00:00 2001
From: Thomas Sibley <tsibley@cpan.org>
Date: Thu, 12 Sep 2013 21:42:39 -0700
Subject: [PATCH] Censor email addresses in mbox From_ headers too, which
sometimes sneak in
For example, see:
https://rt.cpan.org/Ticket/Display.html?ShowHeaders=1;id=88631#txn-1262014
(about half way down)
---
.../BugTracker-Public/Ticket/Elements/ShowMessageHeaders/Default | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/html/Callbacks/BugTracker-Public/Ticket/Elements/ShowMessageHeaders/Default b/html/Callbacks/BugTracker-Public/Ticket/Elements/ShowMessageHeaders/Default
index ce01940..33d10da 100644
--- a/html/Callbacks/BugTracker-Public/Ticket/Elements/ShowMessageHeaders/Default
+++ b/html/Callbacks/BugTracker-Public/Ticket/Elements/ShowMessageHeaders/Default
@@ -8,5 +8,9 @@ return unless RT::BugTracker::Public->IsPublicUser;
for my $h (@$headers) {
next if $h->{'Tag'} =~ /^(?:Subject)$/i;
$h->{'Value'} =~ s/@/ [...] /g;
+
+ # Sometimes mbox From_ lines make it into RT headers
+ $h->{'Tag'} =~ s/@/ [...] /g
+ if $h->{'Tag'} =~ /^From\s+/;
}
</%init>
--
1.8.4