From: | "Jan-Peter Seifert" <Jan-Peter(dot)Seifert(at)gmx(dot)de> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | PGAPI_DriverConnect fails if password contains semicolon |
Date: | 2010-03-12 12:23:26 |
Message-ID: | 20100312122326.146690@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | itishree sukla | 2010-03-15 17:13:21 | Facing Problem in DSN |
Previous Message | VitaliyG | 2010-03-10 15:10:56 | Re: get number of rows selected |