From issues-return-13774-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Wed Jun 02 00:28:03 2010 Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 32560 invoked from network); 2 Jun 2010 00:28:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Jun 2010 00:28:03 -0000 Received: (qmail 39668 invoked by uid 500); 2 Jun 2010 00:28:03 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 39475 invoked by uid 500); 2 Jun 2010 00:28:03 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 39467 invoked by uid 99); 2 Jun 2010 00:28:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jun 2010 00:28:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Jun 2010 00:28:00 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o520Rdmn026154 for ; Wed, 2 Jun 2010 00:27:39 GMT Message-ID: <25267708.119331275438459099.JavaMail.jira@thor> Date: Tue, 1 Jun 2010 20:27:39 -0400 (EDT) From: "Sebb (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (CODEC-91) Handling of embedded padding in base64 encoded data changed in 1.4 In-Reply-To: <781120457.1258858359669.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CODEC-91?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12874333#action_12874333 ] Sebb commented on CODEC-91: --------------------------- The buffer output code when PAD is detected is the same as for the final "if (eof && modulus != 0)". This does nothing if modulus == 1; I wonder if this is the cause of the behaviour reported above by Raphael, which should probably be a new JIRA. Seems to me there need to be tests which exercise all possible moduli. > Handling of embedded padding in base64 encoded data changed in 1.4 > ------------------------------------------------------------------ > > Key: CODEC-91 > URL: https://issues.apache.org/jira/browse/CODEC-91 > Project: Commons Codec > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Chris Pimlott > Attachments: codec-91-actually-works-and-tests-yay.patch > > > 1.4 changed the way that embedded padding characters (i.e. "=") were handled when decoding base64 data. Previously, the decoder ignored them and decoded all the data. Now it stops upon encountering the first padding byte. This breaks compatibility with previous versions. > For example, in 1.4, > b64.decode("Y29tbW9ucwo=".getBytes()); > gives the same result as > b64.decode("Y29tbW9ucwo=Y29tbW9ucwo=".getBytes()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.