mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2025-06-05 21:59:23 +02:00
Improve debug mode
This commit is contained in:
@ -130,6 +130,7 @@ async def _get_public_key(db_session: AsyncSession, key_id: str) -> Key:
|
||||
k.load_pub(actor["publicKey"]["publicKeyPem"])
|
||||
|
||||
# Ensure the right key was fetch
|
||||
# TODO: some server have the key ID `http://` but fetching it return `https`
|
||||
if key_id not in [k.key_id(), k.owner]:
|
||||
raise ValueError(
|
||||
f"failed to fetch requested key {key_id}: got {actor['publicKey']}"
|
||||
|
Reference in New Issue
Block a user