From bdec2d8ea80cf69a8d1ce9c4505452f17f6058fe 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. --- 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 b17986dec85b..4a6f24880252 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 {