-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add condensed #inspect for Pool, Adapter, Config
Previously, it was very easy to accidentally leak a database password in production logs if an error ends up calling inspect on a ConnectionPool or an individual connection (Adapter). This is due to the default `#inspect` output for Pools and Adapters being unnecessarily large, and both currently including passwords (through the DatabaseConfig of a Pool, and the internal configuration of an Adapter). This commit addresses these issues by defining a custom `#inspect` for ConnectionPool, AbstractAdapter, and DatabaseConfig. The condensed `#inspect` only includes a few valuable fields instead of all of the internals, which prevents both the large output and passwords from being included.
- Loading branch information
1 parent
fc60a39
commit 5c81725
Showing
7 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters