Skip to content

Commit

Permalink
fix(hotkey): never redact hot key for encryption (#1668)
Browse files Browse the repository at this point in the history
Hot key should not be encrypted, thus use `c_escape_string` instead of
`c_escape_sensitive_string` (otherwise it would be overwritten with "<redacted>").
  • Loading branch information
Samunroyu authored Nov 1, 2023
1 parent 383ef0f commit 1bdbfd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/hotkey_collector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ void hotkey_collector::query_result(dsn::replication::detect_hotkey_response &re
LOG_INFO_PREFIX(hint);
} else {
resp.err = dsn::ERR_OK;
resp.__set_hotkey_result(pegasus::utils::c_escape_sensitive_string(_result.hot_hash_key));
// Hot key should not be encrypted, thus use `c_escape_string` instead of
// `c_escape_sensitive_string` (otherwise it would be overwritten with
// "<redacted>").
resp.__set_hotkey_result(pegasus::utils::c_escape_string(_result.hot_hash_key));
}
}

Expand Down

0 comments on commit 1bdbfd3

Please sign in to comment.