[pgjdbc/pgjdbc] cd0b55: Add connection property to limit server error deta...

From: Sehrope Sarkuni <noreply(at)github(dot)com>
To: pgsql-jdbc(at)lists(dot)postgresql(dot)org
Subject: [pgjdbc/pgjdbc] cd0b55: Add connection property to limit server error deta...
Date: 2019-11-14 14:13:22
Message-ID: pgjdbc/pgjdbc/push/refs/heads/master/c99ed1-cd0b55@github.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: cd0b555c8045fc71e6f4d0fb0f24a2deb726301e
https://github.com/pgjdbc/pgjdbc/commit/cd0b555c8045fc71e6f4d0fb0f24a2deb726301e
Author: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>
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

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2019-11-14 14:14:01 [pgjdbc/pgjdbc] e64b0a: chore: Document how to use unix domain sockets. (...
Previous Message Roxana Tolosi 2019-11-14 14:04:56 Support for procedures call