]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
pgsql: don't log password msg if password disabled 9985/head
authorJuliana Fajardini <jufajardini@oisf.net>
Tue, 5 Dec 2023 13:56:28 +0000 (10:56 -0300)
committerVictor Julien <victor@inliniac.net>
Wed, 6 Dec 2023 14:27:01 +0000 (15:27 +0100)
If the logging of the password is disabled, there isn't much point in
logging the password message itself.

rust/src/pgsql/logger.rs

index b17986dec85b5a643a66879743502cb959364c37..4a6f24880252fb1ba25816dc53cb796edef6f0ed 100644 (file)
@@ -78,8 +78,6 @@ fn log_request(req: &PgsqlFEMessage, flags: u32) -> Result<JsonBuilder, JsonErro
         }) => {
             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 {