Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVFtF-0003wW-Sr for pgsql-jdbc@arkaria.postgresql.org; Thu, 14 Nov 2019 14:14:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iVFsG-00045N-Ez for pgsql-jdbc@arkaria.postgresql.org; Thu, 14 Nov 2019 14:13:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iVFsG-00045A-2H for pgsql-jdbc@lists.postgresql.org; Thu, 14 Nov 2019 14:13:28 +0000 Received: from out-19.smtp.github.com ([192.30.252.202]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iVFsC-0002T3-5q for pgsql-jdbc@lists.postgresql.org; Thu, 14 Nov 2019 14:13:26 +0000 Date: Thu, 14 Nov 2019 06:13:22 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1573740803; bh=xr9bwcJPb+ejjGMWQpO7rtXE11NEDHmFcBIsxAEgKuY=; h=Date:From:To:Subject:From; b=gdI34pAx+2K8HnVlAg8cmC/sn8Db6jbC+goAnH1oqvyqK0rhjGhsMjtyli0PLbe7V BMcor8xIPKDLDFf9L4t9zJzNi8TJCty033rIJ7svZBc54QxJpWKs6azHMnC147uqhd Ok6divfxXlRI1C4Drx2ebK5qA6Z5MtM7c7N9h0u4= From: Sehrope Sarkuni To: pgsql-jdbc@lists.postgresql.org Message-ID: Subject: [pgjdbc/pgjdbc] cd0b55: Add connection property to limit server error deta... 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: Precedence: bulk Branch: refs/heads/master Home: https://github.com/pgjdbc/pgjdbc Commit: cd0b555c8045fc71e6f4d0fb0f24a2deb726301e https://github.com/pgjdbc/pgjdbc/commit/cd0b555c8045fc71e6f4d0fb0f24a2deb726301e Author: Sehrope Sarkuni Date: 2019-11-14 (Thu, 14 Nov 2019) Changed paths: M pgjdbc/src/main/java/org/postgresql/PGProperty.java M pgjdbc/src/main/java/org/postgresql/core/QueryExecutorBase.java M pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java M pgjdbc/src/main/java/org/postgresql/core/v3/QueryExecutorImpl.java M pgjdbc/src/main/java/org/postgresql/ds/common/BaseDataSource.java M pgjdbc/src/main/java/org/postgresql/gss/GssAction.java M pgjdbc/src/main/java/org/postgresql/gss/MakeGSS.java M pgjdbc/src/main/java/org/postgresql/util/PSQLException.java M pgjdbc/src/main/java/org/postgresql/util/ServerErrorMessage.java A pgjdbc/src/test/java/org/postgresql/test/core/LogServerMessagePropertyTest.java M pgjdbc/src/test/java/org/postgresql/test/jdbc2/Jdbc2TestSuite.java Log Message: ----------- Add connection property to limit server error detail in exception exceptions (#1579) * feat: Add connection property to limit server error detail in exception messages Adds a boolean connection property, LOG_SERVER_MESSAGE_DETAIL ("logServerMessage") that controls whether the full error detail, as reported back by the server, is included in the exception messages. This property can be used to limit potentially sensitive content in server messages from bubbling up in exception messages and stack traces. If set to "false" then only the top level error will be included in the exception message. If set to "true" then all details in the server error will be included. Default value for the new property is "true" to reflect the prior behavior of logging the full error detail. Closes #1577 * fix: Add getter and setter for LOG_SERVER_ERROR_DETAIL to BaseDataSource * test: Add test for logServerErrorDetail connection property