Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maEYP-0005Ms-FW for pgsql-jdbc@arkaria.postgresql.org; Tue, 12 Oct 2021 09:58:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1maEYN-0008Ry-A9 for pgsql-jdbc@arkaria.postgresql.org; Tue, 12 Oct 2021 09:58:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maEYN-0008MU-2y for pgsql-jdbc@lists.postgresql.org; Tue, 12 Oct 2021 09:58:35 +0000 Received: from out-21.smtp.github.com ([192.30.252.204] helo=smtp.github.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1maEYK-0001Hj-Uo for pgsql-jdbc@lists.postgresql.org; Tue, 12 Oct 2021 09:58:34 +0000 Received: from github.com (hubbernetes-node-d6bc19b.ac4-iad.github.net [10.52.201.70]) by smtp.github.com (Postfix) with ESMTPA id 5AF0D52037C for ; Tue, 12 Oct 2021 02:58:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1634032711; bh=bbajfjCvI4c8DHki1CcxO3L80mAevidcUxX4Jzk4vG0=; h=Date:From:To:Subject:From; b=Af8PFKdcqFv422nIaikm1yZ3NiidPlpzBw7BJbBm4Vgt/BnEWKIhva+DqPt+vC1f8 RDhBe0joHxXAIK1U9pGC1n1eyX2JU6tsX4u9BrsmGFE8WH1n56fP5sxSABDPR2zDbw kuhGBoB8rDCebT9hWareUESgQofuCo6WGZH7QRFk= Date: Tue, 12 Oct 2021 02:58:31 -0700 From: Sehrope Sarkuni To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] 624ac5: fix: Provide useful error message for empty or mis... Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Approved: 58GruLoMopuc X-GitHub-Recipient-Address: pgsql-jdbc@lists.postgresql.org X-Auto-Response-Suppress: All List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: 624ac544312f2e3883036475e45e16e689d795cc https://github.com/pgjdbc/pgjdbc/commit/624ac544312f2e3883036475e45e16e689d795cc Author: Sehrope Sarkuni 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.