generated from jCloud/repository-template
Bug fix: use heximal SHA256 hash instead of bytes (repr)
integrations.gitea.middlewares.signature.GiteaSignatureMiddleware.dispatch used the Python bytes representation of the SHA256 hash for comparision in the f-string. Now, the hexadecimal hash is used.
This commit is contained in:
@@ -54,7 +54,7 @@ class GiteaSignatureMiddleware(BaseHTTPMiddleware):
|
||||
self.secret,
|
||||
body,
|
||||
hashlib.sha256
|
||||
).digest()}',
|
||||
).hexdigest()}',
|
||||
signature
|
||||
):
|
||||
raise HTTPException(status_code = 401, detail = 'Invalid signature')
|
||||
|
||||
Reference in New Issue
Block a user