-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reapply gogs hmac patch #6430
Reapply gogs hmac patch #6430
Conversation
Do not send "secret" field in webhook json but rather a header with HMAC. Sending X-Gogs-Signature header and X-Hub-Signature with sha265= prefix.
a0e624d
to
15db889
Compare
Please send PR to SDK first |
Thanks, will do. |
@@ -731,6 +730,8 @@ func (t *HookTask) deliver() { | |||
Header("X-Gitea-Event", string(t.EventType)). | |||
Header("X-Gitea-Signature", t.Signature). | |||
Header("X-Gogs-Delivery", t.UUID). | |||
Header("X-Gogs-Signature", t.Signature). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gogs signature is already set two lines down
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This breaks Drone integration. Drone should get sent a patch to handle either the secret field OR validate the header, that way Drone is backwards compatible with older versions of Gitea too.
Agreed, will work on that too. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
This pull request has been automatically closed because of inactivity. You can re-open it if needed. |
Do not send "secret" field in webhook json but rather a header with HMAC.
Sending X-Gogs-Signature header and X-Hub-Signature with sha265= prefix.
gogs/gogs@3609efe
#3901