]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1611257 - Bugmail is being filtered incorrectly since this morning's BMO deployment
authordklawren <dklawren@users.noreply.github.com>
Thu, 23 Jan 2020 20:47:35 +0000 (15:47 -0500)
committerGitHub <noreply@github.com>
Thu, 23 Jan 2020 20:47:35 +0000 (15:47 -0500)
extensions/BMO/Extension.pm

index a496ea8ec05ddd3518ab8cf9f80acea0be459d85..1820094831e45afe0d48aac83746c97d03420a52 100644 (file)
@@ -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