james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: Incorrect line length limitation while parsing headers
Date Tue, 11 Jan 2011 08:27:20 GMT
Hi there,

I think if it worth it we should release 0.6.2. Release often release
early, you know ;)

Bye,
Norman

2011/1/11 Stefano Bagnara <apache@bago.org>:
> Hi,
>
> in trunk we changed the exception to "max header length exception": as
> we use a single buffer to store a whole header (even if it is folded
> in 100 lines) we need to protect from memory usage using such limit.
> We just released 0.6.1, not sure if we will release 0.6.2 or wait for
> 0.7. In case we will backport the change from trunk and change the
> exception description instead of changing the logic.
>
> Please file an issue at http://issues.apache.org/jira/browse/MIME4J
>
> Stefano
>
> 2011/1/11 Jesse Long <jesse@virtualpostman.co.za>:
>> Hi,
>>
>> Please see the following code in mime4j 0.6:
>>
>> http://james.apache.org/mime4j/xref/org/apache/james/mime4j/parser/AbstractEntity.html#133
>>
>> The for loop checks for excess line length in headers based on the complete
>> length of the header, not on each individual line in the header.
>>
>> So, my header like this:
>>
>> X-Header-Name: <980 chars><CRLF>
>> <20 chars><CRLF>
>> <25 chars><CRLF>
>>
>> fails, because the complete length of the header is > 1000, however, no line
>> in the mime message is longer than 1000 chars...
>>
>> I suggest just removing the check for excess line length in the
>> fillFieldBuffer() method.
>>
>> Cheers,
>> Jesse
>>
>

Mime
View raw message