Closed
Bug 1246228
Opened 9 years ago
Closed 9 years ago
Email addresses must not be encoded
Categories
(Bugzilla :: Email Notifications, defect)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.4
People
(Reporter: stuart-bugzilla, Assigned: LpSolit)
References
Details
Attachments
(3 files, 2 obsolete files)
1.80 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
1.88 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
1.84 KB,
patch
|
dkl
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0
Build ID: 20151102093252
Steps to reproduce:
Upgraded perl Encode from 2.78 to 2.80 (using Fedora 23 RPMs)
Using email submission method of sendmail, with exim 4.86.
Actual results:
Emails from my bugzilla installation started bouncing. Examining the bounces the mails were being sent to =?UTF-8?Q?stuart=40gmail=2Ecom?=@example.com
Expected results:
It appears as if exim doesn't currently understand internationalized
email addresses using MIME encoded words. So not seeing a valid domain
in the address it appends the local domain before forwarding it.
The reason I'm seeing this now appears to be linked to the upgrade of the
perl Encode library. For example:
perl -E 'use Encode; print encode("MIME-Q", "stuart\@gmail.com") . "\n";'
using version 2.78 produces:
stuart@gmail.com
while on 2.80:
=?UTF-8?Q?stuart=40gmail=2Ecom?=
Comment 1•9 years ago
|
||
Considering this seems to impact several releases of the upstream module, we should have a work-around.
Assignee: email-notifications → dylan
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 3•9 years ago
|
||
I can confirm the issue with Encode 2.82. Using MIME-B or MIME-Header doesn't help.
@dan: you are the maintainer of the Encode module on CPAN. Could you tell us if this is a regression or an intentional change? If it's intentional, is there a way to fall back to the old behavior?
Keywords: qawanted
Assignee | ||
Comment 4•9 years ago
|
||
http://search.cpan.org/diff?from=Encode-2.78&to=Encode-2.80&w=1#lib/Encode/MIME/Header.pm
I suspect that the removal of
if ( $word =~ /[^\x00-\x7f]/o ...
is responsible for this problem. It looks like headers are encoded in all cases.
Comment 5•9 years ago
|
||
Looks related to this: https://rt.cpan.org/Ticket/Display.html?id=111853
Also, heh, See Also doesn't support RT?
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Dylan William Hardison [:dylan] from comment #5)
> Also, heh, See Also doesn't support RT?
It does, if the MoreBugUrl extension is enabled.
Comment 7•9 years ago
|
||
Based on https://github.com/dankogai/p5-encode/issues/28, we might consider using https://metacpan.org/pod/MIME::EncWords
to handle encoding.
As an immediate stopgap, we can specify (in Makefile.PL) that we need Encode < 2.80 for master,
and use the previous blacklisting feature for 5.0 branch.
Assignee | ||
Comment 8•9 years ago
|
||
The problem is on our side, not on Encode side, see https://rt.cpan.org/Public/Bug/Display.html?id=111853#txn-1611993. As stated there, and as correctly done in Email::MIME::Encode already, only the phrase must be encoded, not the email address itself. But in Bugzilla::MIME, we encode the whole string, including the email address. So we are doing it wrong.
Flags: blocking5.0.3+
Target Milestone: --- → Bugzilla 5.0
Assignee | ||
Updated•9 years ago
|
Summary: Email addresses now always being sent using internationalized format → Email addresses must not be encoded
Assignee | ||
Comment 9•9 years ago
|
||
header_str_set() has special code which correctly encodes what must be encoded, and leaves alone what must not be encoded, such as email addresses, see http://cpansearch.perl.org/src/RJBS/Email-MIME-1.937/lib/Email/MIME/Encode.pm
Assignee | ||
Comment 10•9 years ago
|
||
Attachment #8736347 -
Flags: review?(dkl)
Assignee | ||
Updated•9 years ago
|
Flags: blocking4.4.12?
Assignee | ||
Comment 11•9 years ago
|
||
|use Encode::MIME::Header| is required by attachment.cgi to alter $Encode::Encoding{'MIME-Q'}->{'bpl'}. This missing dependency has never been caught before because Bugzilla::MIME was (luckily?) loaded before view() in attachment.cgi.
Attachment #8736347 -
Attachment is obsolete: true
Attachment #8736347 -
Flags: review?(dkl)
Attachment #8736873 -
Flags: review?(dkl)
Assignee | ||
Comment 12•9 years ago
|
||
Attachment #8736340 -
Attachment is obsolete: true
Attachment #8736340 -
Flags: review?(dkl)
Attachment #8736874 -
Flags: review?(dkl)
Comment 13•9 years ago
|
||
Comment on attachment 8736874 [details] [diff] [review]
patch for master, v1.1
Review of attachment 8736874 [details] [diff] [review]:
-----------------------------------------------------------------
r=dkl
Attachment #8736874 -
Flags: review?(dkl) → review+
Comment 14•9 years ago
|
||
Comment on attachment 8736873 [details] [diff] [review]
patch for 5.0, v1.1
Review of attachment 8736873 [details] [diff] [review]:
-----------------------------------------------------------------
r=dkl
Attachment #8736873 -
Flags: review?(dkl) → review+
Updated•9 years ago
|
Flags: approval5.0+
Assignee | ||
Comment 15•9 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
6c14fac..60299ec master -> master
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
aa5f64e..652ee91 5.0 -> 5.0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 17•9 years ago
|
||
Dataloss (dropped email) qualifies for a backport in my opinion, unless there are architectural reasons that we can't.
Status: RESOLVED → REOPENED
Flags: blocking4.4.12? → blocking4.4.12+
Resolution: FIXED → ---
Assignee | ||
Updated•9 years ago
|
Target Milestone: Bugzilla 5.0 → Bugzilla 4.4
Assignee | ||
Comment 18•9 years ago
|
||
Attachment #8749602 -
Flags: review?(dkl)
Comment 19•9 years ago
|
||
JFTR, I've tested the tip of the 4.4 branch and can confirm it suffers from the issue (email bounce). I can also confirm that LpSolit's patch fixes this.
Comment 20•9 years ago
|
||
Comment on attachment 8749602 [details] [diff] [review]
patch for 4.4, v1
Review of attachment 8749602 [details] [diff] [review]:
-----------------------------------------------------------------
Confirmed fixed. r=dkl
Attachment #8749602 -
Flags: review?(dkl) → review+
Updated•9 years ago
|
Flags: approval4.4+
Assignee | ||
Comment 21•9 years ago
|
||
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
01ad7ac..f630337 4.4 -> 4.4
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Comment 22•9 years ago
|
||
Installed Bugzilla 5.0.3 today and I could verify the fix.
You need to log in
before you can comment on or make changes to this bug.
Description
•