Join GitHub today
Add connection property to limit server error detail in exception exceptions #1579
This patch keeps the old behavior but adds a new connection property to disable error detail. It defaults to "true" (the old behavior).
Consider this patch a WIP / proof-of-concept until those are addressed.
Also would need some tests to actually try out enabling and disabling things and verifying they're not included.
Also I did a quick compile check and ran a handful of tests but not the entire suite yet. I doubt the error messages break anything but if so we'll need to address those too...
…on 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
So Travis passes and it correctly skips 8.4, but looks like it failed on some unrelated race condition on AppVeyor: https://ci.appveyor.com/project/davecramer/pgjdbc/builds/28856322/job/cyyur72crn2t7ohl#L306
I say this is good to go and will take a peek at that unrelated race condition some time soon.