james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefano Bagnara (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Commented] (MIME4J-216) 8bit character broken when parsing multi-line encoded subject
Date Tue, 26 Jun 2012 07:52:44 GMT

    [ https://issues.apache.org/jira/browse/MIME4J-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13401225#comment-13401225
] 

Stefano Bagnara commented on MIME4J-216:
----------------------------------------

First of all the string you are trying to decode is INVALID. 

Here is the requirements from the MIME specification:
----------------
   Each 'encoded-word' MUST encode an integral number of octets.  The
   'encoded-text' in each 'encoded-word' must be well-formed according
   to the encoding specified; the 'encoded-text' may not be continued in
   the next 'encoded-word'.  (For example, "=?charset?Q?=?=
   =?charset?Q?AB?=" would be illegal, because the two hex digits "AB"
   must follow the "=" in the same 'encoded-word'.)

   Each 'encoded-word' MUST represent an integral number of characters.
   A multi-octet character may not be split across adjacent 'encoded-
   word's.
---------------

Now, I know the Perl Encode/Decode Mime library applies a workaround to deal with such malformed
subjects, so we have to decide if we want to support this kind of malformation, or not.

In order to help us decide this, we have to understand what kind of software creates such
BAD header. First of all the author of THAT software must be informed he's creating BAD mime
messages. Once this is done we will be able to decide if we want to deal with the malformation
or not.
                
> 8bit character broken when parsing multi-line encoded subject
> -------------------------------------------------------------
>
>                 Key: MIME4J-216
>                 URL: https://issues.apache.org/jira/browse/MIME4J-216
>             Project: JAMES Mime4j
>          Issue Type: Test
>          Components: parser (core)
>    Affects Versions: 0.7.1
>            Reporter: changwan lim
>
> Parsing multi-line encoded subject using org.apache.james.mime4j.codec.DecoderUtil.decodeEncodedWords(),
decoded 8bit character is broken.
> Exactly broken character is between last character of first line and first charcter of
second line.

--
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