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

'Invalid secret' is returned but secret is not wrong #17

Closed
nkohlmeier opened this issue Mar 10, 2021 · 2 comments
Closed

'Invalid secret' is returned but secret is not wrong #17

nkohlmeier opened this issue Mar 10, 2021 · 2 comments

Comments

@nkohlmeier
Copy link

Hello.
I get 'Invalid secret' when a Webhook Request is sent. After a bit of debugging I found that the HTTP header that is used for the signature validation is wrong. The header in question is set in webhook.py in line 12. This header is not sent by Gitea which causes the header to be None. I changed the line to _HEADER_SIGNATURE = 'X-Gitea-Signature' which fixes the issue.

This may be a configuration issue on my side. I'm not entirely sure. I can test this further on the weekend and send a pull request.

@pampersrocker
Copy link
Contributor

Thank you, I've changed the implementation yesterday to tackle the deprecation in #15. The documentation is a bit lacking for the webhooks, but you are right, X-Gitea-Signature should be the correct one, HTTP_X_GITEA_SIGNATURE is the PHP wording for the same.

@pampersrocker
Copy link
Contributor

This has been fixed in v1.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants