Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 6F9592E34F3 for ; Sat, 8 Dec 2007 14:31:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 52852-04-7 for ; Sat, 8 Dec 2007 14:31:35 -0400 (AST) Received: from mxp.excelsarc.ro (unknown [89.38.26.199]) by postgresql.org (Postfix) with ESMTP id DD8282E2F59 for ; Sat, 8 Dec 2007 14:27:24 -0400 (AST) Received: (qmail 4014 invoked from network); 8 Dec 2007 18:27:18 -0000 Received: from localhost (127.0.0.1) by localhost with ESMTPS (DHE-RSA-AES256-SHA encrypted); 8 Dec 2007 18:27:18 -0000 From: sulfinu@gmail.com To: Oliver Jowett Subject: Re: JDBC driver patch for non-ASCII users Date: Sat, 8 Dec 2007 20:27:17 +0200 User-Agent: KMail/1.9.7 Cc: pgsql-jdbc@postgresql.org References: <200712071448.21411.sulfinu@gmail.com> <475A0286.706@opencloud.com> In-Reply-To: <475A0286.706@opencloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200712082027.17731.sulfinu@gmail.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/66 X-Sequence-Number: 17921 On Saturday 08 December 2007, Oliver Jowett wrote: > BTW, your patch does not actually change this, you are still using > String.getBytes(String) so if you pass a username / database name / > password that is not representable in the encoding you're using for > authentication, you lose. I didn't claim to solve the undetermined behaviour, I only said I maximized the chances for the authentication to succeed. Read again. > If > we're going to mess around with charsets during authentication I'd like > to see all encodings fixed. In that particular case a new URL parameter > was suggested but I don't think it ever got into the main code. Perhaps > you can follow up on that approach? Well, it CANNOT be fixed for any encoding simply because of lack of support in postgres. I thought about introducing a connection parameter, but the community has to accept first my/a solution. > 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). And the change in build.xml is a correction, check the file before posting assumptions. > I would also be a lot happier if the protocol specification docs were > updated to reflect whatever the current "approved" way of doing > non-ASCII authentication info is before the driver started making > assumptions about it. There's no specification simply because nothing special happens and "non-ASCII authentication" is not even considered.