You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Vít Rozkovec (JIRA)" <ji...@apache.org> on 2018/03/22 18:43:00 UTC
[jira] [Commented] (EMAIL-171) buildMimeMessage() unconditionally
encodes and folds header values
[ https://issues.apache.org/jira/browse/EMAIL-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16410100#comment-16410100 ]
Vít Rozkovec commented on EMAIL-171:
------------------------------------
Is this related to EMAIL-138?
> buildMimeMessage() unconditionally encodes and folds header values
> ------------------------------------------------------------------
>
> Key: EMAIL-171
> URL: https://issues.apache.org/jira/browse/EMAIL-171
> Project: Commons Email
> Issue Type: Bug
> Reporter: Sebb
> Priority: Major
>
> The buildMimeMessage() method unconditionally calls MimeUtility#fold and MimeUtility#encodeText for all entries in the headers Map.
> However the encodeText method is only suitable for "unstructured" RFC 822 headers, i.e. those which consist of arbitrary text.
> If the headers Map contains any keys that have structured values, and the value contains any non-ASCII characters, the generated header may be corrupted.
> If the user adds a structured header to the Map, they need to ensure that the value is already ASCII-encoded using the appropriate strategy for the field.
> This needs to be documented.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)