Re: BUG #17216: No Password Provided Error - uncaught exception

From: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
To: Cliff Sizer <cliffsizer(at)gmail(dot)com>
Cc: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17216: No Password Provided Error - uncaught exception
Date: 2021-10-08 12:44:26
Message-ID: CAH7T-aqyrZaN5pRemHRpyRBzayn_+7Z+6vfx4S+ZsaBxd9N_9w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-jdbc

On Fri, Oct 8, 2021 at 12:25 AM Cliff Sizer <cliffsizer(at)gmail(dot)com> wrote:

> When connecting to the pg database 14.0 and no password (empty) is
> specified the following error message is returned
> "Something unusual has occurred to cause the driver to fail. Please
> report this exception. Empty value for ‘password’ "
>

This is a bug in the driver's handling of SCRAM authentication. We need to
add a check that a non-empty password has been provided by the user before
trying to use it.

The MD5 authentication handling has such a check. I think we just need to
copy it into the handling for the first SCRAM authentication request
message.

FYI, the driver does support SCRAM authentication, the issue here is it
does not gracefully handle the situation where the server requests SCRAM
authentication and the client's connection properties do not include a
password.

I've opened a GitHub issue for this error here:
https://github.com/pgjdbc/pgjdbc/issues/2288

Regards,
-- Sehrope Sarkuni
Founder & CEO | JackDB, Inc. | https://www.jackdb.com/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Narayanan Iyer 2021-10-08 15:31:57 GROUP BY using tablename.* does not work if tablename has 1 column with NULL values
Previous Message Anitha P 2021-10-08 07:27:07 Re: PostgreSQL 12 Authentication type questions.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Sehrope Sarkuni 2021-10-08 13:37:24 [pgjdbc/pgjdbc] 48e80a: test: Fixes ArrayTest to skip jsonb tests on older...
Previous Message Dave Cramer 2021-10-07 19:42:13 [pgjdbc/pgjdbc] bdac58: fix: Updateable ResultSets from release/42.2 PR #2...