public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Emmanuel Seyman <emmanuel@seyman.fr>
To: git-commits@fedoraproject.org
Subject: [rpms/bugzilla] epel10.3: backport patch to prevent email address encoding
Date: Wed, 21 Oct 2026 06:41:37 GMT	[thread overview]
Message-ID: <179256489798.1.13613685350465550418.rpms-bugzilla-a703d31a8f4e@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/bugzilla
Branch : epel10.3
Commit : a703d31a8f4ec536d1f08bc16092b351ecde5201
Author : Emmanuel Seyman <emmanuel@seyman.fr>
Date   : 2016-05-01T18:14:04+02:00
Stats  : +62/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/bugzilla/c/a703d31a8f4ec536d1f08bc16092b351ecde5201?branch=epel10.3

Log:
backport patch to prevent email address encoding

---
diff --git a/bugzilla-email-encode.patch b/bugzilla-email-encode.patch
new file mode 100644
index 0000000..70c2953
--- /dev/null
+++ b/bugzilla-email-encode.patch
@@ -0,0 +1,50 @@
+diff --git a/Bugzilla/MIME.pm b/Bugzilla/MIME.pm
+index 7b5843a..8c6c141 100644
+--- a/Bugzilla/MIME.pm
++++ b/Bugzilla/MIME.pm
+@@ -13,9 +13,6 @@ use warnings;
+ 
+ use parent qw(Email::MIME);
+ 
+-use Encode qw(encode);
+-use Encode::MIME::Header;
+-
+ sub new {
+     my ($class, $msg) = @_;
+     state $use_utf8 = Bugzilla->params->{'utf8'};
+@@ -79,20 +76,12 @@ sub as_string {
+     # MIME-Version must be set otherwise some mailsystems ignore the charset
+     $self->header_set('MIME-Version', '1.0') if !$self->header('MIME-Version');
+ 
+-    # Encode the headers correctly in quoted-printable
++    # Encode the headers correctly.
+     foreach my $header ($self->header_names) {
+         my @values = $self->header($header);
+-        # We don't recode headers that happen multiple times.
+-        next if scalar(@values) > 1;
+-        if (my $value = $values[0]) {
+-            utf8::decode($value) unless $use_utf8 && utf8::is_utf8($value);
+-
+-            # avoid excessive line wrapping done by Encode.
+-            local $Encode::Encoding{'MIME-Q'}->{'bpl'} = 998;
++        map { utf8::decode($_) if defined($_) && !utf8::is_utf8($_) } @values;
+ 
+-            my $encoded = encode('MIME-Q', $value);
+-            $self->header_set($header, $encoded);
+-        }
++        $self->header_str_set($header, @values);
+     }
+ 
+     # Ensure the character-set and encoding is set correctly on single part
+diff --git a/attachment.cgi b/attachment.cgi
+index 5db8f59..40b0c9d 100755
+--- a/attachment.cgi
++++ b/attachment.cgi
+@@ -26,6 +26,7 @@ use Bugzilla::Attachment::PatchReader;
+ use Bugzilla::Token;
+ 
+ use Encode qw(encode find_encoding);
++use Encode::MIME::Header; # Required to alter Encode::Encoding{'MIME-Q'}.
+ 
+ # For most scripts we don't make $cgi and $template global variables. But
+ # when preparing Bugzilla for mod_perl, this script used these

diff --git a/bugzilla.spec b/bugzilla.spec
index caf3a93..aff339d 100644
--- a/bugzilla.spec
+++ b/bugzilla.spec
@@ -6,7 +6,7 @@ URL: https://www.bugzilla.org/
 Name: bugzilla
 Version: 5.0.2
 Group: Applications/Publishing
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: MPLv1.1
 Source0: https://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-%{version}.tar.gz
 Source1: bugzilla-httpd-conf
@@ -14,6 +14,8 @@ Source2: README.fedora.bugzilla
 Source3: bugzilla.cron-daily
 Patch0: bugzilla-rw-paths.patch
 Patch1: bugzilla-dnf.patch
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1246228
+Patch2: bugzilla-email-encode.patch
 
 BuildArch: noarch
 Requires: patchutils
@@ -130,6 +132,12 @@ if [ -f Bugzilla/Install/Requirements.pm.orig ]; then
     : ERROR: Patch1 did not apply cleanly
     exit 1
 fi
+%patch2 -p1
+if [ -f Bugzilla/MIME.pm.orig ]; then
+    : ERROR: Patch2 did not apply cleanly
+    exit 1
+fi
+
 # Remove bundled libs
 rm -rf lib/CGI*
 # Remove bundled binary files
@@ -248,6 +256,9 @@ popd > /dev/null)
 %{bzinstallprefix}/bugzilla/contrib/Bugzilla.pm
 
 %changelog
+* Sun May 01 2016 Emmanuel Seyman <emmanuel@seyman.fr> - 5.0.2-3
+- backport patch to prevent email address encoding
+
 * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 

                 reply	other threads:[~2026-10-21  6:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179256489798.1.13613685350465550418.rpms-bugzilla-a703d31a8f4e@fedoraproject.org \
    --to=emmanuel@seyman.fr \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox