From d3005fbe0cac617808e7016d807c60dc492cb11d Mon Sep 17 00:00:00 2001 From: Juliana Fajardini Date: Tue, 5 Dec 2023 10:56:28 -0300 Subject: [PATCH] pgsql: don't log password msg if password disabled If the logging of the password is disabled, there isn't much point in logging the password message itself. (cherry picked from commit bdec2d8ea80cf69a8d1ce9c4505452f17f6058fe) --- rust/src/pgsql/logger.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/rust/src/pgsql/logger.rs b/rust/src/pgsql/logger.rs index 03b1ad0f4677..7ce5819c3919 100644 --- a/rust/src/pgsql/logger.rs +++ b/rust/src/pgsql/logger.rs @@ -78,8 +78,6 @@ fn log_request(req: &PgsqlFEMessage, flags: u32) -> Result { if flags & PGSQL_LOG_PASSWORDS != 0 { js.set_string_from_bytes("password", payload)?; - } else { - js.set_string(req.to_str(), "password log disabled")?; } } PgsqlFEMessage::SASLResponse(RegularPacket {