• Stratos Psomadakis's avatar
    psycopg: Don't include conn info in exception · e0ae919f
    Stratos Psomadakis authored
    When trying to get a pooled_psycopg2 connection, the _get_pool() method
    checks the connection args against the pool args and raises an exception
    if the two differ. This leads to an internal server error, which results
    in logging the connection and pool info / args, which include the DB
    password, and, depending on the deployment, it might also send them via
    email to the admins. Log the connection and pool args only when log
    level is set to  debug, and remove them from the exception message, so
    that they won't end up being send via email.
__init__.py 5.23 KB