impossibl / pgjdbc-ng

A new JDBC driver for PostgreSQL aimed at supporting the advanced features of JDBC and Postgres
https://impossibl.github.io/pgjdbc-ng
Other
596 stars 108 forks source link

Housekeeper logs passwords #556

Open DzmitrySudnik opened 2 years ago

DzmitrySudnik commented 2 years ago

Hi, I've noticed that the Housekeeper logs entire connection string including the password which is pretty bad from a security perspective. Example of the log message with fake data:

WARNING: Cleaning up leaked connection ( jdbc:pgsql://somhost.com/db_name?user=user_name&ssl.mode=require&password=real_password )

I know that the housekeeper should do nothing if the app is designed and created properly (so no leaks), however the fact that some bug on the app side can cause the library to log a password raises a huge security concern.