Thread: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

From
Michael Paquier
Date:


On Thu, Oct 9, 2014 at 2:54 AM, <eric.hill@jmp.com> wrote:
This is more about your 64-bit ODBC driver than the PostgreSQL database
itself.
This is more adapted on the pgsql-odbc list.
 
We are using version 9.03.03 of your 64-bit ODBC driver.  We are finding
that after SQLDriverConnect() with a bad password, the driver becomes
unstable, and a second call to SQLDriverConnect() can (but does not always)
crash with an access violation.  I have not tried the 32-bit driver to see
if that replicates the problem, which means I also haven't tried other
products that support ODBC, because I don't know of any other 64-bit
products with ODBC support.
This should be easy to reproduce. Have you seen that on Linux/Unix as well.
--
Michael

Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

From
"Inoue, Hiroshi"
Date:
Hi Eric,

(2014/10/09 9:45), Michael Paquier wrote:
>
>
> On Thu, Oct 9, 2014 at 2:54 AM, <eric.hill@jmp.com
> <mailto:eric.hill@jmp.com>> wrote:
>
>     This is more about your 64-bit ODBC driver than the PostgreSQL database
>     itself.
>
> This is more adapted on the pgsql-odbc list.
>
>     We are using version 9.03.03 of your 64-bit ODBC driver.  We are finding
>     that after SQLDriverConnect() with a bad password, the driver becomes
>     unstable, and a second call to SQLDriverConnect() can (but does not
>     always)
>     crash with an access violation.  I have not tried the 32-bit driver
>     to see
>     if that replicates the problem, which means I also haven't tried other
>     products that support ODBC, because I don't know of any other 64-bit
>     products with ODBC support.

Are you using an SSL connection?

regards,
Hiroshi Inoue


--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12723 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen



Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

From
Eric Hill
Date:
Hey, Hiroshi,

Not that I am aware of.  Here is the full connection string:


DSN=PostgreSQL35W;DATABASE=postgres;SERVER=rdcesx07044.race.sas.com;PORT=5432;UID=postgres;PWD=%_PWD_%;CA=d;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;;CX=1c20502bb;A1=7.4;

HTH,

Eric

-----Original Message-----
From: Inoue, Hiroshi [mailto:inoue@tpf.co.jp]
Sent: Friday, October 10, 2014 12:08 AM
To: Eric Hill
Cc: Michael Paquier; PostgreSQL mailing lists
Subject: Re: [ODBC] [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

Hi Eric,

(2014/10/09 9:45), Michael Paquier wrote:
>
>
> On Thu, Oct 9, 2014 at 2:54 AM, <eric.hill@jmp.com
> <mailto:eric.hill@jmp.com>> wrote:
>
>     This is more about your 64-bit ODBC driver than the PostgreSQL database
>     itself.
>
> This is more adapted on the pgsql-odbc list.
>
>     We are using version 9.03.03 of your 64-bit ODBC driver.  We are finding
>     that after SQLDriverConnect() with a bad password, the driver becomes
>     unstable, and a second call to SQLDriverConnect() can (but does not
>     always)
>     crash with an access violation.  I have not tried the 32-bit driver
>     to see
>     if that replicates the problem, which means I also haven't tried other
>     products that support ODBC, because I don't know of any other 64-bit
>     products with ODBC support.

Are you using an SSL connection?

regards,
Hiroshi Inoue


--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12723 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen



Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

From
"Inoue, Hiroshi"
Date:
Hi Eric,

On 2014/10/10 22:09, Eric Hill wrote:
> Hey, Hiroshi,
>
> Not that I am aware of.  Here is the full connection string:
>
>
DSN=PostgreSQL35W;DATABASE=postgres;SERVER=rdcesx07044.race.sas.com;PORT=5432;UID=postgres;PWD=%_PWD_%;CA=d;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;;CX=1c20502bb;A1=7.4;

Hmm this connection seems to use neither ssl nor libpq.
Are you using MS tools like MS access or excel?

regards,
Hiroshi Inoue


Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

From
Eric Hill
Date:
Hey, Hiroshi,

I am developer on the JMP statistical visualization tool dev team (www.jmp.com).  This is a desktop application that runs on Windows and Mac.  Our product uses ODBC calls to connect to ODBC data sources and retrieve data.  We have both 32-bit and 64-bit versions of the product.  The scenario we are seeing this problem with is 64-bit JMP talking a Windows PostgreSQL server.  The connection string is coming from the driver.  I looked in the driver dialog to see if there was a way to specify SSL or something, but I did not see anything.

I have not tried connecting to the PostgreSQL server from Excel or Access, because I have 32-bit versions of those products installed and the 64-bit PostgreSQL ODBC driver.  I’d be willing to try a 32-bit scenario with Excel as the client if you think that would help.

Thanks,

Eric

Sent from Windows Mail

From: Inoue, Hiroshi
Sent: ‎Saturday‎, ‎October‎ ‎11‎, ‎2014 ‎5‎:‎19‎ ‎AM
To: Eric Hill
Cc: Michael Paquier, PostgreSQL mailing lists

Hi Eric,

On 2014/10/10 22:09, Eric Hill wrote:
> Hey, Hiroshi,
>
> Not that I am aware of.  Here is the full connection string:
>
> DSN=PostgreSQL35W;DATABASE=postgres;SERVER=rdcesx07044.race.sas.com;PORT=5432;UID=postgres;PWD=%_PWD_%;CA=d;A6=;A7=100;A8=4096;B0=255;B1=8190;BI=0;C2=dd_;;CX=1c20502bb;A1=7.4;

Hmm this connection seems to use neither ssl nor libpq.
Are you using MS tools like MS access or excel?

regards,
Hiroshi Inoue

Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

From
"Inoue, Hiroshi"
Date:
(2014/10/12 2:28), Eric Hill wrote:
> Hey, Hiroshi,
>
> I am developer on the JMP statistical visualization tool dev team
> (www.jmp.com <http://www.jmp.com>).  This is a desktop application that
> runs on Windows and Mac.  Our product uses ODBC calls to connect to ODBC
> data sources and retrieve data.  We have both 32-bit and 64-bit versions
> of the product.  The scenario we are seeing this problem with is 64-bit
> JMP talking a Windows PostgreSQL server.  The connection string is
> coming from the driver.  I looked in the driver dialog to see if there
> was a way to specify SSL or something, but I did not see anything.

Unfortunately I can't reproduce the crash here.
What's your calling sequence of ODBC APIs after SQLDriverConnect()
with bad password?

regards,
Hiroshi Inoue


--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12751 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen



Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

From
Eric Hill
Date:
Okay, I'll do my best.

Perhaps the first key to the scenario is that when you use the ODBC Administrator in Windows to set up the PostgreSQL
DSN,the UI from the PostgreSQL driver is going to want a valid user name and password, which it stores in the registry.
After doing that, go to the registry (HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\<PostgreSQL DSN>) and blank out the
password.

In our application, we call SQLDriverConnect passing in a connection string that includes a user name but no password,
and,importantly, we pass SQL_DRIVER_COMPLETE as the last parameter.  So we are requesting that the driver prompt for
connectioninformation if it can't connect with the string we've passed in.  It is at that point that the bad password
issupplied, and that's when the access violation, sometimes, occurs.  This morning, even I am having trouble
reproducingthe crash.  It does not happen every time.  Our testers in China seem to have better luck.
 

Eric

-----Original Message-----
From: Inoue, Hiroshi [mailto:inoue@tpf.co.jp] 
Sent: Tuesday, October 14, 2014 2:46 AM
To: Eric Hill
Cc: Michael Paquier; PostgreSQL mailing lists
Subject: Re: [ODBC] [BUGS] BUG #11608: ODBC driver crashes after wrong password entered

(2014/10/12 2:28), Eric Hill wrote:
> Hey, Hiroshi,
>
> I am developer on the JMP statistical visualization tool dev team 
> (www.jmp.com <http://www.jmp.com>).  This is a desktop application 
> that runs on Windows and Mac.  Our product uses ODBC calls to connect 
> to ODBC data sources and retrieve data.  We have both 32-bit and 
> 64-bit versions of the product.  The scenario we are seeing this 
> problem with is 64-bit JMP talking a Windows PostgreSQL server.  The 
> connection string is coming from the driver.  I looked in the driver 
> dialog to see if there was a way to specify SSL or something, but I did not see anything.

Unfortunately I can't reproduce the crash here.
What's your calling sequence of ODBC APIs after SQLDriverConnect() with bad password?

regards,
Hiroshi Inoue


--
I am using the free version of SPAMfighter.
SPAMfighter has removed 12751 of my spam emails to date.
Get the free SPAMfighter here: http://www.spamfighter.com/len

Do you have a slow PC? Try a Free scan
http://www.spamfighter.com/SLOW-PCfighter?cid=sigen