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

Add signatures to webhooks #6428

Merged
merged 4 commits into from
Mar 26, 2019
Merged

Add signatures to webhooks #6428

merged 4 commits into from
Mar 26, 2019

Conversation

techknowlogick
Copy link
Member

Fix #3901

Code is based on PR from Gogs (PR 3692)

@techknowlogick techknowlogick added the type/enhancement An improvement of existing functionality label Mar 25, 2019
@@ -657,11 +662,23 @@ func prepareWebhook(e Engine, w *Webhook, repo *Repository, event HookEventType,
payloader = p
}

var signature string
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: On L611 the secret is still added to the payload. This is being kept that was as to not be a breaking change.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 25, 2019
@codecov-io
Copy link

codecov-io commented Mar 25, 2019

Codecov Report

Merging #6428 into master will decrease coverage by <.01%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6428      +/-   ##
==========================================
- Coverage   38.85%   38.85%   -0.01%     
==========================================
  Files         365      365              
  Lines       51401    51413      +12     
==========================================
+ Hits        19974    19978       +4     
- Misses      28559    28566       +7     
- Partials     2868     2869       +1
Impacted Files Coverage Δ
models/webhook.go 62.38% <33.33%> (-0.8%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 909feaa...cd8791e. Read the comment docs.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 25, 2019
@lafriks lafriks added this to the 1.9.0 milestone Mar 25, 2019
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 25, 2019
@techknowlogick techknowlogick merged commit 22d3d02 into go-gitea:master Mar 26, 2019
@techknowlogick techknowlogick deleted the webhook-signatures branch April 21, 2019 03:02
@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
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use HMAC for signing webhooks
5 participants