Skip to content

Not working with gitea after upgrading to gitea version 1.15.0 #262

@w41l

Description

@w41l

Gitea has deprecated plaintext secret in webhook payload in version 1.15.0 and now I had to disabled secret-token in repository configuration

Error log

2021-09-06 10:38:55,260 [ERROR]  File "/usr/lib64/python3.9/site-packages/gitautodeploy/parsers/github.py", line 37, in validate_request
2021-09-06 10:38:55,260 [ERROR]      if not self.verify_signature(repo_config['secret-token'], request_body, request_headers['x-hub-signature']):
2021-09-06 10:38:55,260 [ERROR]
2021-09-06 10:38:55,260 [ERROR]  File "/usr/lib64/python3.9/site-packages/gitautodeploy/parsers/github.py", line 47, in verify_signature
2021-09-06 10:38:55,260 [ERROR]      result = "sha1=" + hmac.new(str(token), body, hashlib.sha1).hexdigest()
2021-09-06 10:38:55,261 [ERROR]
2021-09-06 10:38:55,261 [ERROR]  File "/usr/lib64/python3.9/hmac.py", line 170, in new
2021-09-06 10:38:55,261 [ERROR]      return HMAC(key, msg, digestmod)
2021-09-06 10:38:55,261 [ERROR]
2021-09-06 10:38:55,261 [ERROR]  File "/usr/lib64/python3.9/hmac.py", line 53, in __init__
2021-09-06 10:38:55,261 [ERROR]      raise TypeError("key: expected bytes or bytearray, but got %r" % type(key).__name__)
2021-09-06 10:38:55,261 [ERROR]
2021-09-06 10:38:55,261 [ERROR]  TypeError: key: expected bytes or bytearray, but got 'str'

Gitea issue url: go-gitea/gitea#11755

It would be nice if GAD can works again with gitea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions