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:
jakob.scheid committed 2026-05-03 18:06:45 +02:00
1 parent 30a982c95d
commit 23faf74092
1 file changed
+1 -1
@@ -54,7 +54,7 @@ class GiteaSignatureMiddleware(BaseHTTPMiddleware):
self.secret,
body,
hashlib.sha256
).digest()}',
).hexdigest()}',
signature
):
raise HTTPException(status_code = 401, detail = 'Invalid signature')