Skip to content
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

Conversation

zobo
Copy link

@zobo zobo commented Mar 26, 2019

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

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.
@zobo zobo mentioned this pull request Mar 26, 2019
7 tasks
@zobo zobo changed the title Reapply gogs hmac patch: https://github.com/gogs/gogs/commit/3609efe2… Reapply gogs hmac patch Mar 26, 2019
@zobo zobo force-pushed the feature/issue-3901-use-hmac-for-signing-webhooks branch from a0e624d to 15db889 Compare March 26, 2019 09:41
@lafriks lafriks added pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! modifies/api This PR adds API routes or modifies them type/enhancement An improvement of existing functionality and removed modifies/api This PR adds API routes or modifies them labels Mar 26, 2019
@lafriks
Copy link
Member

lafriks commented Mar 26, 2019

Please send PR to SDK first

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 26, 2019
@zobo
Copy link
Author

zobo commented Mar 26, 2019

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).
Copy link
Member

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

Copy link
Member

@techknowlogick techknowlogick left a 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.

@zobo
Copy link
Author

zobo commented Mar 27, 2019

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.

@stale
Copy link

stale bot commented May 26, 2019

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.

@stale stale bot added the issue/stale label May 26, 2019
@stale
Copy link

stale bot commented Jul 25, 2019

This pull request has been automatically closed because of inactivity. You can re-open it if needed.

@stale stale bot closed this Jul 25, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/stale lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants