Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 24006 invoked from network); 14 Jul 2008 22:29:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jul 2008 22:29:36 -0000 Received: (qmail 66968 invoked by uid 500); 14 Jul 2008 22:29:35 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 66897 invoked by uid 500); 14 Jul 2008 22:29:35 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 66886 invoked by uid 99); 14 Jul 2008 22:29:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2008 15:29:35 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 72.14.220.156 as permitted sender) Received: from [72.14.220.156] (HELO fg-out-1718.google.com) (72.14.220.156) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2008 22:28:42 +0000 Received: by fg-out-1718.google.com with SMTP id d23so2626233fga.24 for ; Mon, 14 Jul 2008 15:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=JA/im6S+c3Ud+ckt3yJLZ9Z3hDY61QQ2h2tuTTrZO4k=; b=ES3NGWZ1V5YlxF52WQT65VkBKLu49da6NwqyL6SQxDPbY3kbSxDjkCy04rpmcSsjdN VMN/QUj4DtNMZ+KkhKbG+CzgB+Rq8Zb58Qu70FyY7y2QN2kpXLv/FGKyLFCt9EGM4Lr0 +f2Y99dBaTpEQv2XZJK1pSWAXc6UT2U0/6QrU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=dHuUgCH1nbKdiSn0qK0Fl1ozK2an5W08MUq/etxdZYfg07vQOCdZ/Pcnk8N/Q2VvQJ FfTwm9QfKyZ4CUHDI6lEp+3jFoalfGF+H9MD23ePRP7sTP6opZfA8SI7pJaKyXe/+NJ6 As6mU0s7xpjEpXWksOAj8et4iDBuEHB8evdVk= Received: by 10.86.59.2 with SMTP id h2mr15009261fga.12.1216074545541; Mon, 14 Jul 2008 15:29:05 -0700 (PDT) Received: by 10.86.62.18 with HTTP; Mon, 14 Jul 2008 15:29:05 -0700 (PDT) Message-ID: <25aac9fc0807141529i77104751hc0f7e2daa7c86a86@mail.gmail.com> Date: Mon, 14 Jul 2008 23:29:05 +0100 From: sebb To: "Commons Developers List" Subject: Re: [CODEC] Base64 decode() handling of invalid encoded data In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <25aac9fc0806210519p21dbeefco3dd002d4d8d95bcb@mail.gmail.com> <598ad5b50806251202v73bd95efj44e0dec5997c6125@mail.gmail.com> <25aac9fc0807140524n7de7a58av2db1e6b92dc07a77@mail.gmail.com> <25aac9fc0807140637ob066fffhb57d7e2ca5567bd1@mail.gmail.com> <25aac9fc0807140821y236edf48t79966142afc55173@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On 14/07/2008, Jochen Wiedmann wrote: > On Mon, Jul 14, 2008 at 5:21 PM, sebb wrote: > > > Just noticed https://issues.apache.org/jira/browse/CODEC-68 which > > implies that at least one person is expecting to be able to include > > invalid base64 characters without a problem - in that case, after the > > PAD characters. > > > > So maybe there is a need to preserve compatibility after all. > > > Questionable. I understand the problem in CODEC-68 to be the > ArrayIndexOutOfBoundsException, which is indeed not what one would > expect. Indeed, and the OOB has been fixed. But the example showed: 'n', 'A', '=', '=', 0x9c So clearly the poster is expecting this to succeed. However, that is not a valid message, and would trigger the invalid character checking - assuming that the code checks that PAD characters only occur at the end of the message. I was testing the code to check for this - a test failed, and that led me to CODEC-68. > Jochen > > > > -- > Look, that's why there's rules, understand? So that you think before > you break 'em. > > -- (Terry Pratchett, Thief of Time) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org