From 212e7823554dcb97ff6500dedefb08d5a75b37a9 Mon Sep 17 00:00:00 2001 From: r3g_5z Date: Thu, 19 Jan 2023 20:55:46 -0500 Subject: [PATCH] use santisied psql string (#1144) Noticed the plaintext password of my postgresql server in my coturn logs, but postgresql errors would return the password sanitised. Simple fix to log the sanitised string. ![image](https://user-images.githubusercontent.com/112147643/213053494-c8a5d226-0b04-4c8d-9b52-3e1330291a39.png) Signed-off-by: r3g_5z Signed-off-by: r3g_5z --- src/apps/relay/dbdrivers/dbd_pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/relay/dbdrivers/dbd_pgsql.c b/src/apps/relay/dbdrivers/dbd_pgsql.c index 02c66669..ac535444 100644 --- a/src/apps/relay/dbdrivers/dbd_pgsql.c +++ b/src/apps/relay/dbdrivers/dbd_pgsql.c @@ -82,7 +82,7 @@ static PGconn *get_pqdb_connection(void) { TURN_LOG_FUNC(TURN_LOG_LEVEL_ERROR, "Cannot open PostgreSQL DB connection: <%s>, runtime error\n", pud->userdb_sanitized); } else if (!donot_print_connection_success) { - TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "PostgreSQL DB connection success: %s\n", pud->userdb); + TURN_LOG_FUNC(TURN_LOG_LEVEL_INFO, "PostgreSQL DB connection success: %s\n", pud->userdb_sanitized); donot_print_connection_success = 1; } }