PGAPI_DriverConnect fails if password contains semicolon

Поиск
Список
Период
Сортировка
От Jan-Peter Seifert
Тема PGAPI_DriverConnect fails if password contains semicolon
Дата
Msg-id 20100312122326.146690@gmx.net
обсуждение исходный текст
Список 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
calledby 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
thirdparty 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

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Devrim GÜNDÜZ
Дата:
Сообщение: Re: Specifying pg_config path
Следующее
От: itishree sukla
Дата:
Сообщение: Facing Problem in DSN