Skip to content

Commit

Permalink
chore: Don't print password to log on replica AUTH failure (#3403)
Browse files Browse the repository at this point in the history
  • Loading branch information
chakaz authored Jul 29, 2024
1 parent 776bd79 commit 7100168
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/server/protocol_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ error_code ProtocolClient::ConnectAndAuth(std::chrono::milliseconds connect_time
auto cmd = masteruser.empty() ? StrCat("AUTH ", masterauth)
: StrCat("AUTH ", masteruser, " ", masterauth);
RETURN_ON_ERR(SendCommandAndReadResponse(cmd));
last_cmd_ = "AUTH"; // Make sure the password is not printed to logs
PC_RETURN_ON_BAD_RESPONSE(CheckRespIsSimpleReply("OK"));
}
return error_code{};
Expand Down

0 comments on commit 7100168

Please sign in to comment.