This is an automated email from the ASF dual-hosted git repository.
wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/master by this push:
new 1bdbfd3e5 fix(hotkey): never redact hot key for encryption (#1668)
1bdbfd3e5 is described below
commit 1bdbfd3e548a9228c5fce1c24a52560f60125ae2
Author: Samunroyu <[email protected]>
AuthorDate: Wed Nov 1 17:20:41 2023 +0800
fix(hotkey): never redact hot key for encryption (#1668)
Hot key should not be encrypted, thus use `c_escape_string` instead of
`c_escape_sensitive_string` (otherwise it would be overwritten with
"<redacted>").
---
src/server/hotkey_collector.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/server/hotkey_collector.cpp b/src/server/hotkey_collector.cpp
index 026851e2b..618c2c18f 100644
--- a/src/server/hotkey_collector.cpp
+++ b/src/server/hotkey_collector.cpp
@@ -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));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]