diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-06-27 21:21:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-27 20:21:09 +0100 |
commit | 9b1b4b543358c212a3da2b480d361d0c1375b279 (patch) | |
tree | 2bb767491b82bde8a76bf8b3148f8b7aaae9167c /services/webhook/msteams.go | |
parent | 0b27b93728fd3cf2ecc82ac6a2b5859270543ef2 (diff) | |
download | gitea-9b1b4b543358c212a3da2b480d361d0c1375b279.tar.gz gitea-9b1b4b543358c212a3da2b480d361d0c1375b279.zip |
Refactor Webhook + Add X-Hub-Signature (#16176)
This PR removes multiple unneeded fields from the `HookTask` struct and adds the two headers `X-Hub-Signature` and `X-Hub-Signature-256`.
## :warning: BREAKING :warning:
* The `Secret` field is no longer passed as part of the payload.
* "Breaking" change (or fix?): The webhook history shows the real called url and not the url registered in the webhook (`deliver.go`@129).
Close #16115
Fixes #7788
Fixes #11755
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'services/webhook/msteams.go')
-rw-r--r-- | services/webhook/msteams.go | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/services/webhook/msteams.go b/services/webhook/msteams.go index 51bb28a361..035dbc1c4c 100644 --- a/services/webhook/msteams.go +++ b/services/webhook/msteams.go @@ -55,9 +55,6 @@ type ( } ) -// SetSecret sets the MSTeams secret -func (m *MSTeamsPayload) SetSecret(_ string) {} - // JSONPayload Marshals the MSTeamsPayload to json func (m *MSTeamsPayload) JSONPayload() ([]byte, error) { json := jsoniter.ConfigCompatibleWithStandardLibrary |