From mime4j-dev-return-1203-apmail-james-mime4j-dev-archive=james.apache.org@james.apache.org Tue Jan 11 08:27:50 2011 Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 84370 invoked from network); 11 Jan 2011 08:27:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Jan 2011 08:27:50 -0000 Received: (qmail 11233 invoked by uid 500); 11 Jan 2011 08:27:50 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 11178 invoked by uid 500); 11 Jan 2011 08:27:48 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 11170 invoked by uid 99); 11 Jan 2011 08:27:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jan 2011 08:27:47 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of norman.maurer@googlemail.com designates 209.85.216.170 as permitted sender) Received: from [209.85.216.170] (HELO mail-qy0-f170.google.com) (209.85.216.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jan 2011 08:27:42 +0000 Received: by qyk10 with SMTP id 10so2327002qyk.1 for ; Tue, 11 Jan 2011 00:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=1B5v/oXhadoVw3dne+kyPKAB+Fi3sTYZMv811blEe2g=; b=uCO88IzRYSAL30/xml8MQptZypTgkV33eFvd2sdGO/ESTXnkhUNkzVG0aoOFipxx3p 5mCvQ5x3loiEhASD1RknD8nSrOmXbgJtonbK+XKHdV1vcs+U4aA0N6ePolnDhzabbgPP wCSnoovs1R5zrdwS90YF6kYXgwMqxcQXfOQRc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=fcoH7Rqg9U3dM57Qeuxf810l1OnVfCbrLsetsbPBTPA/lhYoWVaM75uhNNkaGIU+CU T/BqnUXfxfWL8LE23F9ADQFynMV1mk6owRaO0MkEZ9Mm/46oXAzvgdBkVLeFP7tdcct0 B1BL2LpNnJLY/8z7WBFeGpSH/9zsyTQen5kt8= MIME-Version: 1.0 Received: by 10.229.81.6 with SMTP id v6mr6328065qck.223.1294734440750; Tue, 11 Jan 2011 00:27:20 -0800 (PST) Sender: norman.maurer@googlemail.com Received: by 10.220.180.131 with HTTP; Tue, 11 Jan 2011 00:27:20 -0800 (PST) In-Reply-To: References: <4D2C0AEE.5070700@virtualpostman.co.za> Date: Tue, 11 Jan 2011 09:27:20 +0100 X-Google-Sender-Auth: BGVVyy3V4L4AP4C2H4udWS6if-A Message-ID: Subject: Re: Incorrect line length limitation while parsing headers From: Norman Maurer To: mime4j-dev@james.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org 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 : > 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 : >> 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> >> <20 chars> >> <25 chars> >> >> 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 >> >