feat(bot): add signature verification logging

- Added info-level logging to provide details about signature verification, including secret length and partial hashes for expected and received signatures.
- Helps in debugging signature mismatches without exposing full sensitive data.
This commit is contained in:
Harald Hoyer 2026-02-03 16:23:14 +01:00
parent d5967cf392
commit 33937ab115

View file

@ -72,6 +72,8 @@ def verify_signature(body: bytes, signature: str) -> bool:
if signature.startswith("sha256="):
signature = signature[7:]
log.info(f"Signature verification: secret_len={len(BOT_SECRET)}, expected={expected[:16]}..., received={signature[:16]}...")
return hmac.compare_digest(expected, signature)