Skip to content

Commit

Permalink
pgsql: don't log password msg if password disabled
Browse files Browse the repository at this point in the history
If the logging of the password is disabled, there isn't much point in
logging the password message itself.
  • Loading branch information
jufajardini committed Dec 6, 2023
1 parent c1bf955 commit 1ff2fb2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions rust/src/pgsql/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1ff2fb2

Please sign in to comment.