Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 94786 invoked from network); 28 Oct 2009 06:11:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Oct 2009 06:11:21 -0000 Received: (qmail 71521 invoked by uid 500); 28 Oct 2009 06:11:19 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 71402 invoked by uid 500); 28 Oct 2009 06:11:18 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 71392 invoked by uid 99); 28 Oct 2009 06:11:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 06:11:18 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of juliusdavies@gmail.com designates 209.85.212.180 as permitted sender) Received: from [209.85.212.180] (HELO mail-vw0-f180.google.com) (209.85.212.180) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Oct 2009 06:11:15 +0000 Received: by vws10 with SMTP id 10so35945vws.10 for ; Tue, 27 Oct 2009 23:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=wSFnjjJjQFaQhV31SWQrXmWgJQFVJDVwWkZYiqgPUHM=; b=DKK91VpHujzLEMaGhWWpTPjYTdPqhBinkU3FJ6nPcaW78xm/eaxHAHm7azOx51tzpw 43JHX+1LkEGQhBIk7uCd9n7LPEARP7+qHuUy7Y+ztIQZaZl/Jtat4ouniTNaTgDA4kw1 pvn9q5Kx6CTa8AH7h21QJ6mIBWSh2aIdi2OSM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=UXXFkyBu2L/HwhzhW2j4FamUA+MBwgpW83bSOwURyxIVO4F+0ZOEauhjbYivO9PnYH ax3/bxJl/71ymWZH+6cw5GO+ehmakE+k7qWJs18f5TQcxxQWsmc2bFpFA8IbjT+p1/xe J7M7q1t6Oe3rsS/2runtgjdCerpZj05DNxIJ4= MIME-Version: 1.0 Received: by 10.220.125.106 with SMTP id x42mr10842446vcr.104.1256710253217; Tue, 27 Oct 2009 23:10:53 -0700 (PDT) In-Reply-To: <94C476C03BFF5E42AC3518FDAC9643C4E2C34DB4ED@HQMAIL.rocketsoftware.com> References: <3394a89a0910261309p36452696s4760fa9ab3a57006@mail.gmail.com> <94C476C03BFF5E42AC3518FDAC9643C4E2C34DB4ED@HQMAIL.rocketsoftware.com> Date: Tue, 27 Oct 2009 23:10:53 -0700 Message-ID: <598ad5b50910272310s605e1606r70091b6d46ddf227@mail.gmail.com> Subject: Re: [CODEC] Migrate issue from 1.3 to 1.4 From: Julius Davies To: Commons Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I bet you it's a similar bug to this: http://code.google.com/p/oauth-signpost/issues/detail?id=3D18 3. The python-oauth library (the reference implementation for OAuth) barfs because the signature is "IYALjIZeGwFri8xtv4uIaDBO3Ow%3D%0D%0A" which decodes to 'IYALjIZeGwFri8xtv4uIaDBO3Ow=3D\r\n'. Some code I wrote tonight highlights the problem: the static Base64.encodeBase64() vs. the instance (new Base64().encode()) methods are behaving differently in this regard. Since the unit-tests mostly focus on the static methods, we missed this variation. import org.apache.commons.codec.binary.*; public class B64 { public static void main(String[] args) throws Exception { Base64 b64 =3D new Base64(); String s1 =3D "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aaaaaaaa"; String s2 =3D "aaaaaaaaaa"; String s3 =3D "a"; byte[] b1 =3D s1.getBytes("UTF-8"); byte[] b2 =3D s2.getBytes("UTF-8"); byte[] b3 =3D s3.getBytes("UTF-8"); byte[] result; result =3D Base64.encodeBase64(b1); System.out.println("[" + new String(result, "UTF-8") + "]"); result =3D b64.encode(b1); System.out.println("[" + new String(result, "UTF-8") + "]"); result =3D Base64.encodeBase64(b2); System.out.println("[" + new String(result, "UTF-8") + "]"); result =3D b64.encode(b2); System.out.println("[" + new String(result, "UTF-8") + "]"); result =3D Base64.encodeBase64(b3); System.out.println("[" + new String(result, "UTF-8") + "]"); result =3D b64.encode(b3); System.out.println("[" + new String(result, "UTF-8") + "]"); } } Here's my output: $ java -cp commons-codec-1.3.jar:. B64 [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYW= FhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ=3D=3D] [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYW= FhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ=3D=3D] [YWFhYWFhYWFhYQ=3D=3D] [YWFhYWFhYWFhYQ=3D=3D] [YQ=3D=3D] [YQ=3D=3D] $ java -cp commons-codec-1.4.jar:. B64 [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYW= FhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ=3D=3D] [YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYW= Fh YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ=3D=3D ] [YWFhYWFhYWFhYQ=3D=3D] [YWFhYWFhYWFhYQ=3D=3D ] [YQ=3D=3D] [YQ=3D=3D ] yours, Julius On Mon, Oct 26, 2009 at 1:10 PM, Gary Gregory wrote: > > Can you please be more specific? Can you supply a test case? > > Thank you, > Gary > > > -----Original Message----- > > From: Murat Y=FCcel [mailto:kodeperkeren@gmail.com] > > Sent: Monday, October 26, 2009 13:09 > > To: user > > Subject: [CODEC] Migrate issue from 1.3 to 1.4 > > > > Hi All > > > > We are currently using commons-codec in our project. We have used this > > version for about one year. > > This means that we have a lot of users in our database with encrypted > > password. We have used the Base64 > > class to encode the passwords. > > The problem is that after upgrading to 1.4 none of the users can > > login, so we have made a rollback. > > > > Is this a known issue? I havent find anything on your website. > > > > Regards > > > > /Murat > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > > For additional commands, e-mail: user-help@commons.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > -- yours, Julius Davies 250-592-2284 (Home) 250-893-4579 (Mobile) http://juliusdavies.ca/logging.html --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org