pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: sulfinu@gmail.com
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JDBC driver patch for non-ASCII users
Date: Sun, 09 Dec 2007 09:54:19 +1300
Message-ID: <475B047B.5020100@opencloud.com> (raw)
In-Reply-To: <200712082027.17731.sulfinu@gmail.com>
References: <200712071448.21411.sulfinu@gmail.com>
	<475A0286.706@opencloud.com>
	<200712082027.17731.sulfinu@gmail.com>

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



view thread (17+ messages)  latest in thread

Message-ID: <475B047B.5020100@opencloud.com>
Permalink:  ../475B047B.5020100@opencloud.com/
Also on:    postgresql.org/message-id/475B047B.5020100@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, sulfinu@gmail.com
  Subject: Re: JDBC driver patch for non-ASCII users
  In-Reply-To: <475B047B.5020100@opencloud.com>
  References: <200712071448.21411.sulfinu@gmail.com> <475A0286.706@opencloud.com> <200712082027.17731.sulfinu@gmail.com> <475B047B.5020100@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox