Thread: [pgjdbc/pgjdbc] 624ac5: fix: Provide useful error message for empty or mis...

[pgjdbc/pgjdbc] 624ac5: fix: Provide useful error message for empty or mis...

From
Sehrope Sarkuni
Date:
  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: 624ac544312f2e3883036475e45e16e689d795cc
      https://github.com/pgjdbc/pgjdbc/commit/624ac544312f2e3883036475e45e16e689d795cc
  Author: Sehrope Sarkuni <sehrope@jackdb.com>
  Date:   2021-10-12 (Tue, 12 Oct 2021)

  Changed paths:
    M pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java
    M pgjdbc/src/test/java/org/postgresql/jdbc/ScramTest.java

  Log Message:
  -----------
  fix: Provide useful error message for empty or missing passwords for SCRAM auth

Previously the driver would throw an internal error if the server requested SCRAM authentication
and no or an empty password was specified. Fixes things so that the driver provides a helpful
error message to the user that a non-empty password is required.

Also adds tests to verify the behavior and expected error messages.