Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ucze2-0007Ok-N6 for pgsql-odbc@arkaria.postgresql.org; Thu, 16 May 2013 14:59:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Ucze2-00020i-6C for pgsql-odbc@arkaria.postgresql.org; Thu, 16 May 2013 14:59:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Ucze1-00020d-Nm for pgsql-odbc@postgresql.org; Thu, 16 May 2013 14:59:01 +0000 Received: from sd.tpf.co.jp ([210.161.239.34]) by magus.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Uczdv-0005jq-R0 for pgsql-odbc@postgresql.org; Thu, 16 May 2013 14:59:01 +0000 Received: (qmail 25523 invoked by uid 512); 16 May 2013 14:58:51 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 16 May 2013 14:58:51 -0000 Received: from unknown (HELO ?192.168.1.3?) (110.5.25.94) by sd.tpf.co.jp with SMTP; 16 May 2013 14:58:51 -0000 Message-ID: <5194F426.1020000@tpf.co.jp> Date: Thu, 16 May 2013 23:58:46 +0900 From: Hiroshi Inoue User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Jan-Peter Seifert CC: pgsql-odbc@postgresql.org Subject: Re: Problem with special characters in password when using SQLDriverConnect References: , <5193AA61.2080708@tpf.co.jp> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org Hi, (2013/05/16 22:48), Jan-Peter Seifert wrote: > > Hello, > >> Gesendet: Mittwoch, 15. Mai 2013 um 17:31 Uhr >> Von: "Hiroshi Inoue" > >> 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