libencode-perl 2.82-1: MIME encoding broken on 16.04

Bug #1670226 reported by Mihai Moldovan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libencode-perl (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

lsb_release -rd:

Description: Ubuntu 16.04.2 LTS
Release: 16.04

I'm using perl for encoding the From: header value as part of a git hook with the author's email address.

This worked fine on 12.04, but fails badly on 16.04.

Example:

echo "Foooooo Baaaaaar <email address hidden>" | perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)'
=> =?UTF-8?Q?Foooooo=20Baaaaaar=20=3Cfoo?= =?UTF-8?Q?=40bar=2Ebaz=3E?=

The string split and additional added whitespace means that MTA's see an address (after decoding) of "Foooooo Baaaaaar <foo @bar.baz>" and thus break in horrible ways.

If characters are removed (preferably from the "real name" part), the split is shifted or at best averted - but typically one cannot limit author addresses to a very limited fixed size.

The same command executed on OS X 10.9 with MacPort's perl 5.24.1 and Encode 2.88 is working fine:

echo "Foooooo Baaaaaar <email address hidden>" | perl -CI -MEncode -e 'print Encode::encode("MIME-Q", <STDIN>)'
=?UTF-8?Q?Foooooo_Baaaaaar_=3Cfoo=40bar=2Ebaz=3E=0A?=

This is generally what I'd expect as well - no string splitting in-between. Given that we try to avoid patching software whenever possible in MacPorts, this is a "close-to-vanilla" test, although obviously the Encode module at version 2.88 is different than what libencode-perl ships - at version 2.82_1.

The same split up also happens on Debian unstable, which ships the Encode module version 2.80_1 as part of its libperl5.24 package.
If libencode-perl (2.88-1) is installed on Debian unstable - overriding the core module version, this bug does *not* occur.

On Ubuntu 16.04, the Encode module as a Perl core module (i.e., without libencode-perl being installed), does not have any capabilities of MIME conversion, so testing without libencode-perl is impossible for the scope of this report.

Other Ubuntu versions might also be affected. I have only tested 16.04.

Revision history for this message
Florian Schlichting (fschlich) wrote :

As you note this is fixed as of Encode 2.88 (but see the discussion in https://github.com/dankogai/p5-encode/pull/68), so I'm marking this bug as "fix released"

Changed in libencode-perl (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.