Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 09A7E633CBA for ; Fri, 12 Mar 2010 08:23:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 40633-02 for ; Fri, 12 Mar 2010 12:23:23 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mail.postgresql.org (Postfix) with SMTP id AD34A633079 for ; Fri, 12 Mar 2010 08:23:29 -0400 (AST) Received: (qmail 20416 invoked by uid 0); 12 Mar 2010 12:23:27 -0000 Received: from 192.124.237.7 by www062.gmx.net with HTTP; Fri, 12 Mar 2010 13:23:26 +0100 (CET) Content-Type: text/plain; charset="iso-8859-1" Date: Fri, 12 Mar 2010 13:23:26 +0100 From: "Jan-Peter Seifert" Message-ID: <20100312122326.146690@gmx.net> MIME-Version: 1.0 Subject: PGAPI_DriverConnect fails if password contains semicolon To: pgsql-odbc@postgresql.org X-Authenticated: #955937 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX181PK5etTU14Exytf8mCYLOAiWtiKH9HVt93wb+an jr7372jGJmzKKwu/If+mnsp56EROk+mImeMg== Content-Transfer-Encoding: 8bit X-GMX-UID: W0PzJD8BMydhYnbDZGpl4vNjaGRhZtrB X-FuHaFi: 0.5 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.788 tagged_above=-10 required=5 tests=AWL=-0.603, BAYES_40=-0.185 X-Spam-Level: X-Archive-Number: 201003/4 X-Sequence-Number: 10210 Hello, we are using a call to SQLConnect in our app to connect via ODBC to our databases. A third party tool that is being called by our app is using SQLDriverConnect. If the user's password contains a ';' the connection with our app is still successful, but the connection with the third party tool fails. It seems that the password/DSN gets truncated at the semicolon in/for function PGAPI_DriverConnect. successful: . . . DSN info: DSN='test_db',server='localhost',port='5432',dbase='test_db',user='test_user',passwd='xxxxx' onlyread='0',protocol='7.4',showoid='0',fakeoidindex='0',showsystable='1' conn_settings='', conn_encoding='(null)' translation_dll='',translation_option='' conn = 032C42A0, PGAPI_Connect(DSN='test_db', UID='test_user', PWD='xxxxx') . . . ----------------------------------------------------- fails: . . . conn=04AA7120, PGAPI_DriverConnect( in)='DSN=test_db;UID=test_user;PWD=xxx;', fDriverCompletion=0 DSN info: DSN='test_db',server='localhost',port='5432',dbase='test_db',user='test_user',passwd='xxxxx' onlyread='0',protocol='7.4',showoid='0',fakeoidindex='0',showsystable='1' conn_settings='', conn_encoding='(null)' translation_dll='',translation_option='' Driver Version='08.04.0200,200912260001' linking 1500 static Multithread library Global Options: fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=32766, max_longvarchar_size=32766 disable_optimizer=0, ksqo=1, unique_index=1, use_declarefetch=1 text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64 extra_systable_prefixes='dd_;', conn_settings='' conn_encoding='' CONN ERROR: func=LIBPQ_connect, desc='', errnum=101, errmsg='FATAL: password authentication failed for user "test_user" . . . ----------------------------------------------------------- Backslashes in the password that aren't masked by a second backslash let the authentication fail in both psqlODBC functions - regardless of the server's standard_conforming_strings setting. Check into this, please. Thank you very much, Peter -- GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.! http://portal.gmx.net/de/go/dsl02