[pgjdbc/pgjdbc] cd0b55: Add connection property to limit server error deta...
Sehrope Sarkuni <[email protected]> Thu, 14 Nov 2019 06:13:22 -0800
| Newsgroups | gmane.comp.db.postgresql.jdbc |
|---|---|
| Message-ID | <pgjdbc/pgjdbc/push/refs/heads/master/[email protected]> |
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: cd0b555c8045fc71e6f4d0fb0f24a2deb726301e
https://github.com/pgjdbc/pgjdbc/commit/cd0b555c8045fc71e6f4d0fb0f24a2deb726301e
Author: Sehrope Sarkuni <[email protected]>
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