Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id BBCF32E004D for ; Sat, 8 Dec 2007 16:54:26 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 37314-03 for ; Sat, 8 Dec 2007 16:54:21 -0400 (AST) Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by postgresql.org (Postfix) with ESMTP id 8B0E42E0148 for ; Sat, 8 Dec 2007 16:54:23 -0400 (AST) Received: from 122-57-33-135.jetstream.xtra.co.nz ([122.57.33.135] helo=[192.168.1.2]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1J16gj-0007F0-UT; Sun, 09 Dec 2007 09:54:18 +1300 Message-ID: <475B047B.5020100@opencloud.com> Date: Sun, 09 Dec 2007 09:54:19 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: sulfinu@gmail.com CC: pgsql-jdbc@postgresql.org Subject: Re: JDBC driver patch for non-ASCII users References: <200712071448.21411.sulfinu@gmail.com> <475A0286.706@opencloud.com> <200712082027.17731.sulfinu@gmail.com> In-Reply-To: <200712082027.17731.sulfinu@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/67 X-Sequence-Number: 17922 sulfinu@gmail.com wrote: > On Saturday 08 December 2007, Oliver Jowett wrote: >> Also, your patch appears to have a number of unnecessary changes in it >> (e.g. why did you change the encoding used for the password salt, or the >> results of UnixCrypt? and there's a spurious change to build.xml too..) > There's nothing spurious in my patch. > I haven't touched UnixCrypt, simply because there's nothing to be done about > it (not as a simple patch). Can you explain what this change does, then? > String result = UnixCrypt.crypt(salt, password); > - byte[] encodedResult = result.getBytes("US-ASCII"); > + byte[] encodedResult = result.getBytes(Encoding.AUTHENTICATION_PHASE_ENCODING); AFAIK UnixCrypt.crypt() should only be returning ASCII anyway, right? Same thing re. salt decoding, doesn't the server only ever send ASCII? > And the change in build.xml is a correction, check the file before posting > assumptions. If you have fixes to build.xml that are not related to your encoding changes, please post them as a separate patch with an explanation. If you post a number of unrelated changes as a single patch, it makes it much harder to selectively apply them. I have no comment on whether that correction is necessary or not -- but it's unexplained and not encoding related, so it shouldn't be there. -O