Skip to content

Commit

Permalink
pgsql: use static str for log & remove whitespaces
Browse files Browse the repository at this point in the history
Removing the white spaces from the password message, as these can cause
issues with grepping commands querying log results, and also doesn't
show a consistent behavior among different environments.

Also replace function call with static str, as it wasn't needed there.
  • Loading branch information
jufajardini committed Dec 5, 2023
1 parent 13cc493 commit fa4c36a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/src/pgsql/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ 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")?;
js.set_string("password_message", "password_log_disabled")?;
}
}
PgsqlFEMessage::SASLResponse(RegularPacket {
Expand Down

0 comments on commit fa4c36a

Please sign in to comment.