From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Jan-Peter Seifert <Jan-Peter.Seifert@gmx.de>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Problem with special characters in password when using SQLDriverConnect
Date: Thu, 16 May 2013 23:58:46 +0900
Message-ID: <5194F426.1020000@tpf.co.jp> (raw)
In-Reply-To: <trinity-6901c03f-0697-4493-bd86-779816915279-1368712107174@3capp-gmx-bs58>
References: <trinity-7255442f-f309-4ae2-914d-a8f99f67560a-1368453897636@3capp-gmx-bs63>
<5193AA61.2080708@tpf.co.jp>
<trinity-6901c03f-0697-4493-bd86-779816915279-1368712107174@3capp-gmx-bs58>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
Hi,
(2013/05/16 22:48), Jan-Peter Seifert wrote:
>
> Hello,
>
>> Gesendet: Mittwoch, 15. Mai 2013 um 17:31 Uhr
>> Von: "Hiroshi Inoue" <inoue@tpf.co.jp>
>
>> There already had been a patch in 09.00.0100 but this problem obviously persists in psqlODBC 09.01.0100 Unicode. Maybe this has been patched in the ANSI version only?
>
>> I don't understand why ANSI drivers work.
>
> That this has been fixed in the ANSI version only was just an assumption on my side, because the sudden increase of the 'known critical' characters seemed to be connected to the switch to the Unicode version of psqlODBC.
> It looks like the Unicode and the ANSI version use the 'same' internal functions though?
Yes it's essentially the same code.
>> Could you please try the dll on testing for 9.1.0300 at
>> http://www.ne.jp/asahi/inocchichichi/entrance/psqlodbc/index.html
>
> Thank you very much for the patch!
>
> We tested several passwords in connection with the SQLDriverConnect function and the Unicode version of psqlODBC:
>
> password: %2 (two chars!)
> submitted as:
> …;UID=user;PWD=%2; fails
> …;UID=user;PWD={%2}; works
>
> password: %25 (three chars!)
> …;UID=user;PWD=%25; fails
> …;UID=user;PWD={%25}; works
The psqlodbc driver expects Percent-Encoding for the password
option as well as the *Connect Settings* option unless the value
is enclosed with braces.
> password: }{
> …;UID=user;PWD={}{}; fails
The driver can't distinguish the first '}' from the terminating bracket.
Please look at http://msdn.microsoft.com/en-us/library/ms130822.aspx .
> password: abc
> …;UID=user;PWD=abc; works (as expected)
> …;UID=user;PWD={abc}; works
>
> Password: a;bc
> …;UID=user;PWD=a;bc; fails (as expected)
> …;UID=user;PWD={a;bc}; works
>
> Best regards,
>
> Peter
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
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-odbc@postgresql.org
Cc: inoue@tpf.co.jp, Jan-Peter.Seifert@gmx.de
Subject: Re: Problem with special characters in password when using SQLDriverConnect
In-Reply-To: <5194F426.1020000@tpf.co.jp>
References: <trinity-7255442f-f309-4ae2-914d-a8f99f67560a-1368453897636@3capp-gmx-bs63> <5193AA61.2080708@tpf.co.jp> <trinity-6901c03f-0697-4493-bd86-779816915279-1368712107174@3capp-gmx-bs58> <5194F426.1020000@tpf.co.jp>
* 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