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

From: Eric Hill <Eric(dot)Hill(at)jmp(dot)com>
To: "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: [BUGS] BUG #11608: ODBC driver crashes after wrong password entered
Date: 2014-10-15 12:36:55
Message-ID: e836daeb52b74a2dbb581bf90d5092b8@MERCMBX34D.na.SAS.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-odbc

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 connection information if it can't connect with the string we've passed in. It is at that point that the bad password is supplied, and that's when the access violation, sometimes, occurs. This morning, even I am having trouble reproducing the crash. It does not happen every time. Our testers in China seem to have better luck.

Eric

-----Original Message-----
From: Inoue, Hiroshi [mailto:inoue(at)tpf(dot)co(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Casey & Gina 2014-10-15 13:18:02 Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done
Previous Message Michael Paquier 2014-10-15 08:31:54 Re: BUG #11638: Transaction safety fails when constraints are dropped and analyze is done

Browse pgsql-odbc by date

  From Date Subject
Next Message Bala krishna Devasani 2014-10-15 15:41:55 PostgreSQL crash at SQLColAttribute()
Previous Message Jade Koskela 2014-10-15 05:38:55 Re: crash bug on closed connection