mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-02 19:48:17 +00:00
Webhook post fails due to empty secretKey (#5203)
This commit is contained in:
parent
f8751f3bb0
commit
994a83bb95
@ -210,7 +210,7 @@ public class WebhookRepository extends EntityRepository<Webhook> {
|
||||
try {
|
||||
String json = JsonUtils.pojoToJson(list);
|
||||
Response response;
|
||||
if (webhook.getSecretKey() != null) {
|
||||
if (webhook.getSecretKey() != null && !webhook.getSecretKey().isEmpty()) {
|
||||
String hmac = "sha256=" + CommonUtil.calculateHMAC(webhook.getSecretKey(), json);
|
||||
response = getTarget().header(RestUtil.SIGNATURE_HEADER, hmac).post(javax.ws.rs.client.Entity.json(json));
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user