This is an automated email from the ASF dual-hosted git repository.
zhaoqingran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
The following commit(s) were added to refs/heads/master by this push:
new a7629e317a Modify the issue of incorrect signature in Alibaba's SMS
sending (#3788)
a7629e317a is described below
commit a7629e317a01c0073154197558da6fd519f8a5db
Author: warrobe <[email protected]>
AuthorDate: Thu Nov 6 10:38:48 2025 +0800
Modify the issue of incorrect signature in Alibaba's SMS sending (#3788)
Co-authored-by: Logic <[email protected]>
Co-authored-by: Tomsun28 <[email protected]>
Co-authored-by: shown <[email protected]>
Co-authored-by: yunfan24 <[email protected]>
Co-authored-by: Calvin <[email protected]>
Co-authored-by: aias00 <[email protected]>
Co-authored-by: Duansg <[email protected]>
---
.../src/main/java/org/apache/hertzbeat/alert/util/CryptoUtils.java | 2 +-
.../src/test/java/org/apache/hertzbeat/alert/util/CryptoUtilsTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/util/CryptoUtils.java
b/hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/util/CryptoUtils.java
index 43684396bb..17de042d67 100644
---
a/hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/util/CryptoUtils.java
+++
b/hertzbeat-alerter/src/main/java/org/apache/hertzbeat/alert/util/CryptoUtils.java
@@ -88,7 +88,7 @@ public class CryptoUtils {
* @return lowercase hexadecimal string
*/
public static String hmacSha256Hex(String key, String data) {
- return hmacSha256Hex(hmac256(key.getBytes(UTF8), data), data);
+ return hmacSha256Hex(key.getBytes(UTF8), data);
}
/**
diff --git
a/hertzbeat-alerter/src/test/java/org/apache/hertzbeat/alert/util/CryptoUtilsTest.java
b/hertzbeat-alerter/src/test/java/org/apache/hertzbeat/alert/util/CryptoUtilsTest.java
index cb8047264c..99555c0ecf 100644
---
a/hertzbeat-alerter/src/test/java/org/apache/hertzbeat/alert/util/CryptoUtilsTest.java
+++
b/hertzbeat-alerter/src/test/java/org/apache/hertzbeat/alert/util/CryptoUtilsTest.java
@@ -42,7 +42,7 @@ public class CryptoUtilsTest {
@Test
void testHmacSha256Hex() {
String signature = CryptoUtils.hmacSha256Hex("your-real-key",
"your-real-data");;
-
assertEquals("41878ccd7ecd795a2dd7ec39be7f33fed4be3ec75f5307689e39dd6f41fdbaac",
signature);
+
assertEquals("f09adf5f4bf94eddecf0f7c8f39a3a8dc7f95ccdc2faf2e5330bc5a78e4bba95",
signature);
}
}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]