incubator-zeta-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jérôme Vieilledent (Updated) (JIRA) <j...@apache.org>
Subject [jira] [Updated] (ZETACOMP-114) Using ezcMailAddress with specific charset can break final Mail headers
Date Tue, 03 Jan 2012 16:10:39 GMT

     [ https://issues.apache.org/jira/browse/ZETACOMP-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jérôme Vieilledent updated ZETACOMP-114:
----------------------------------------

    Description: 
When using ezcMailAddress with a charset other than us-ascii (let's say "utf-8") for a sender
with a name having accents (also valid for cc, bcc and receiver), ezcMailTools::composeEmailAddress()
does the encoding via iconv_mime_encode(). This operation eventually adds a line break (\r\n)
if generated name is too long (exceeding 76 chars).
Problem is that this operation is done a 2nd time in ezcMailPart::generateHeaders(), potentially
introducing a new line break. This completely messes up the mail headers and can end with
something like that :

{code}
From: =?utf-8?Q?mailTest=C3=A4=C3=B6=C3=BC=20mail?==?utf-8?Q?Test?=

 =?utf-8?Q?=C3=A4=C3=B6=C3=BC?= <jv@ez.no>
To: Test mail <jv+test@ez.no>
Subject: =?utf-8?Q?This=20is=20a=20test=20H=C3=A9h?==?utf-8?Q?=C3=A9=C3=B6?=
 =?utf-8?Q?=C3=AF=C3=BB$=C3=B9=20@=C3=A8=C3=AA=C3=AB=C3=B8?=
MIME-Version: 1.0
User-Agent: eZ Components
Date: Tue, 03 Jan 2012 14:56:21 +0100
Message-Id: <201201031414321.21215.0@ez.no>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
{code}

Here the From header is completely broken.
The original sender name is "mailTestäöüß mailTestäöüß"

  was:
When using ezcMailAddress with a charset other than us-ascii (let's say "utf-8") for a sender
with a name having accents (also valid for cc, bcc and receiver), ezcMailTools::composeEmailAddress()
does the encoding via iconv_mime_encode(). This operation eventually adds a line break (\r\n)
if generated name is too long (exceeding 76 chars).
Problem is that this operation is done a 2nd time in ezcMailPart::generateHeaders(), potentially
introducing a new line break. This completely messes up the mail headers and can end with
something like that :

{code}
From: =?utf-8?Q?mailTest=C3=A4=C3=B6=C3=BC=20mail?==?utf-8?Q?Test?=

 =?utf-8?Q?=C3=A4=C3=B6=C3=BC?= <jv@ez.no>
To: Test mail <jv+test@ez.no>
Subject: =?utf-8?Q?This=20is=20a=20test=20H=C3=A9h?==?utf-8?Q?=C3=A9=C3=B6?=
 =?utf-8?Q?=C3=AF=C3=BB$=C3=B9=20@=C3=A8=C3=AA=C3=AB=C3=B8?=
MIME-Version: 1.0
User-Agent: eZ Components
Date: Tue, 03 Jan 2012 14:56:21 +0100
Message-Id: <201201031414321.21215.0@ez.no>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
{code}

Here the *From* header is completely broken.
The original sender name is _mailTestäöüß mailTestäöüß_

    
> Using ezcMailAddress with specific charset can break final Mail headers
> -----------------------------------------------------------------------
>
>                 Key: ZETACOMP-114
>                 URL: https://issues.apache.org/jira/browse/ZETACOMP-114
>             Project: Zeta Components
>          Issue Type: Bug
>          Components: Mail
>         Environment: PHP 5.3 / 5.4
>            Reporter: Jérôme Vieilledent
>
> When using ezcMailAddress with a charset other than us-ascii (let's say "utf-8") for
a sender with a name having accents (also valid for cc, bcc and receiver), ezcMailTools::composeEmailAddress()
does the encoding via iconv_mime_encode(). This operation eventually adds a line break (\r\n)
if generated name is too long (exceeding 76 chars).
> Problem is that this operation is done a 2nd time in ezcMailPart::generateHeaders(),
potentially introducing a new line break. This completely messes up the mail headers and can
end with something like that :
> {code}
> From: =?utf-8?Q?mailTest=C3=A4=C3=B6=C3=BC=20mail?==?utf-8?Q?Test?=
>  =?utf-8?Q?=C3=A4=C3=B6=C3=BC?= <jv@ez.no>
> To: Test mail <jv+test@ez.no>
> Subject: =?utf-8?Q?This=20is=20a=20test=20H=C3=A9h?==?utf-8?Q?=C3=A9=C3=B6?=
>  =?utf-8?Q?=C3=AF=C3=BB$=C3=B9=20@=C3=A8=C3=AA=C3=AB=C3=B8?=
> MIME-Version: 1.0
> User-Agent: eZ Components
> Date: Tue, 03 Jan 2012 14:56:21 +0100
> Message-Id: <201201031414321.21215.0@ez.no>
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 8bit
> {code}
> Here the From header is completely broken.
> The original sender name is "mailTestäöüß mailTestäöüß"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message