mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-15 09:55:49 +01:00
handle empty password for JSON webhook tests, fixes #1168
This commit is contained in:
@@ -119,7 +119,7 @@ trait WebHookService {
|
||||
}
|
||||
case WebHookContentType.JSON => {
|
||||
httpPost.setEntity(EntityBuilder.create().setText(json).build())
|
||||
if (!webHook.token.isEmpty) {
|
||||
if (webHook.token.exists(_.trim.nonEmpty)) {
|
||||
httpPost.addHeader("X-Hub-Signature", XHub.generateHeaderXHubToken(XHubConverter.HEXA_LOWERCASE, XHubDigest.SHA1, webHook.token.orNull, json.getBytes("UTF-8")))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user