From: dklawren Date: Thu, 23 Jan 2020 20:47:35 +0000 (-0500) Subject: Bug 1611257 - Bugmail is being filtered incorrectly since this morning's BMO deployment X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07ba40a686ffae3a72ab2f8fe71326e6b6159db1;p=thirdparty%2Fbugzilla.git Bug 1611257 - Bugmail is being filtered incorrectly since this morning's BMO deployment --- diff --git a/extensions/BMO/Extension.pm b/extensions/BMO/Extension.pm index a496ea8ec..182009483 100644 --- a/extensions/BMO/Extension.pm +++ b/extensions/BMO/Extension.pm @@ -50,7 +50,7 @@ use Bugzilla::Util; use Date::Parse; use DateTime; use Email::MIME::ContentType qw(parse_content_type); -use Encode qw(find_encoding encode_utf8); +use Encode qw(find_encoding encode_utf8 decode); use File::MimeInfo::Magic; use List::MoreUtils qw(natatime any last_value); use List::Util qw(first); @@ -1771,6 +1771,11 @@ sub _inject_headers_into_body { my $it = natatime(2, $email->header_pairs); while (my ($name, $value) = $it->()) { next unless $name =~ /^X-Bugzilla-(.+)/; + + # Remove special encoding since these values + # will become part of the email body itself. + $value = decode('MIME-Q', $value); + if ($name eq 'X-Bugzilla-Flags' || $name eq 'X-Bugzilla-Changed-Field-Names') { # these are multi-value fields, split on space