Improve summary

This commit is contained in:
Thomas Sileo 2022-08-24 20:12:10 +02:00
parent 3b767eae11
commit ae28cf2294
5 changed files with 35 additions and 30 deletions

View file

@ -215,10 +215,13 @@ async def httpsig_checker(
logger.exception(f'Failed to fetch HTTP sig key {hsig["keyId"]}')
return HTTPSigInfo(has_valid_signature=False)
has_valid_signature = _verify_h(
signed_string, base64.b64decode(hsig["signature"]), k.pubkey
)
# FIXME: fetch/update the user if the signature is wrong
httpsig_info = HTTPSigInfo(
has_valid_signature=_verify_h(
signed_string, base64.b64decode(hsig["signature"]), k.pubkey
),
has_valid_signature=has_valid_signature,
signed_by_ap_actor_id=k.owner,
server=server,
)