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

Benoit Tellier commented on MIME4J-314:
---------------------------------------

> Is it possible to allow this as part of Lenient parsing?

I am not sure how to do that and what a good criteria for this should be.

The class to look at is MimeBoundaryInputStream and uses Quick Search ( SUNDAY 
D.M., 1990, A very fast substring search algorithm,Communications of the ACM . 
33(8):132-142.) algorithm in BufferedLineReaderInputStream to do its job. 
Making this context dependent would likely be challenging...

Do you know which MUA emmitted the message? Are other MIME libraries handling 
this?

Would you like to try submit a patch for this?

> Support for nested boundary parameter value as outer boundary value with a 
> prefix.
> ----------------------------------------------------------------------------------
>
>                 Key: MIME4J-314
>                 URL: https://issues.apache.org/jira/browse/MIME4J-314
>             Project: James Mime4j
>          Issue Type: Wish
>    Affects Versions: 0.8.6
>            Reporter: Geetha
>            Priority: Major
>         Attachments: mime_with_nested_boundaries.rtf
>
>
> We have mime messages which we need to support that have nested multipart 
> where the inner boundary parameter value is the prefix of the outer boundary 
> parameter value. 
> This format is not an RFC complaint from 
> [RFC2046#section-5.1|https://datatracker.ietf.org/doc/html/rfc2046#section-5.1]
>  which states that
> The boundary delimiter MUST NOT appear inside any of the encapsulated parts, 
> on a line by itself, or as the prefix of any line.
> In the example attached, the boundary  
> {color:#0747a6}-----Mail-Builder-Boundary-7972-1633093116{color} is used as a 
> boundary for (outer) multipart. Then for the nested multipart, 
> {color:#0747a6}-----Mail-Builder-Boundary-7972-1633093116-1{color} is used as 
> a boundary. *Note* that the outer boundary is a prefix of this nested 
> boundary and as a result, the Mime4J mime parser is not able to parse this 
> content properly.
> Is it possible to allow this as part of Lenient parsing?
> [^mime_with_nested_boundaries.rtf]



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to