Skip to content

Use HMAC for signing webhooks #3901

Closed
@captn3m0

Description

@captn3m0
  • Gitea version (or commit ref): 1.4.1
  • Git version: NA
  • Operating system: NA
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Several tools rely on standard GitHub webhooks, which include a X-Hub-Signature header to validate the webhook. Gitea sends the secret in the payload JSON itself, which doesn't work for all services.

The standard github event signature is a simple HMAC-SHA1 of the request payload with the secret as the key. [Docs]

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/securitySomething leaks user information or is otherwise vulnerable. Should be fixed!type/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions