summaryrefslogtreecommitdiffstats
path: root/models/webhook.go
diff options
context:
space:
mode:
authorAntoine GIRARD <sapk@users.noreply.github.com>2018-01-30 23:09:16 +0100
committerLauris BH <lauris@nix.lv>2018-01-31 00:09:16 +0200
commitb3fd94c13d00f368dbd0f9414e699077ee4a6887 (patch)
treed6dacb844e486fa670f10bf61fac4ca3f18527a8 /models/webhook.go
parentd09704e9032606654d07b03e1700474ca4d550e0 (diff)
downloadgitea-b3fd94c13d00f368dbd0f9414e699077ee4a6887.tar.gz
gitea-b3fd94c13d00f368dbd0f9414e699077ee4a6887.zip
Add sensitive headers (#3429)
* Add HeaderWithSensitiveCase methods to respect casing * Update webhook.go
Diffstat (limited to 'models/webhook.go')
-rw-r--r--models/webhook.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/models/webhook.go b/models/webhook.go
index b18b9e35a3..62db84f86a 100644
--- a/models/webhook.go
+++ b/models/webhook.go
@@ -588,8 +588,8 @@ func (t *HookTask) deliver() {
Header("X-Gitea-Event", string(t.EventType)).
Header("X-Gogs-Delivery", t.UUID).
Header("X-Gogs-Event", string(t.EventType)).
- Header("X-GitHub-Delivery", t.UUID).
- Header("X-GitHub-Event", string(t.EventType)).
+ HeaderWithSensitiveCase("X-GitHub-Delivery", t.UUID).
+ HeaderWithSensitiveCase("X-GitHub-Event", string(t.EventType)).
SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify})
switch t.ContentType {