diff --git a/AUTHORS.rst b/AUTHORS.rst index 0f61b4da..18559763 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -33,5 +33,6 @@ answer newbie questions, and generally made taiga that much better: - Motius GmbH - Riccardo Coccioli - Ricky Posner +- Stefan Auditor - Yamila Moreno - Yaser Alraddadi diff --git a/CHANGELOG.md b/CHANGELOG.md index 728ad58c..9174775d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Improve messages generated on webhooks input. - Add mentions support in commit messages. - Cleanup hooks code. + - Rework webhook signature header to align with larger implementations and defined [standards](https://superfeedr-misc.s3.amazonaws.com/pubsubhubbub-core-0.4.html\#authednotify). (thanks to [Stefan Auditor](https://github.com/sanduhrs)) - Add created-, modified-, finished- and finish_date queryset filters - Support exact match, gt, gte, lt, lte - added issues, tasks and userstories accordingly diff --git a/taiga/webhooks/tasks.py b/taiga/webhooks/tasks.py index 75e3caad..9e9489ab 100644 --- a/taiga/webhooks/tasks.py +++ b/taiga/webhooks/tasks.py @@ -66,7 +66,8 @@ def _send_request(webhook_id, url, key, data): serialized_data = UnicodeJSONRenderer().render(data) signature = _generate_signature(serialized_data, key) headers = { - "X-TAIGA-WEBHOOK-SIGNATURE": signature, + "X-TAIGA-WEBHOOK-SIGNATURE": signature, # For backward compatibility + "X-Hub-Signature": "sha1={}".format(signature), "Content-Type": "application/json" } request = requests.Request('POST', url, data=serialized_data, headers=headers)