From 29c3bf4b5a9c5d81897f41c7a375a4c89029bc63 Mon Sep 17 00:00:00 2001 From: kaniini Date: Wed, 31 Oct 2018 02:28:51 +0000 Subject: [PATCH] http signatures: immediately fail validation attempt if no actor keys can be found --- relay/http_signatures.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/relay/http_signatures.py b/relay/http_signatures.py index 5322d57..0965cfc 100644 --- a/relay/http_signatures.py +++ b/relay/http_signatures.py @@ -74,6 +74,9 @@ async def fetch_actor_key(actor): async def validate(actor, request): pubkey = await fetch_actor_key(actor) + if not pubkey: + return False + logging.debug('actor key: %r', pubkey) headers = request.headers.copy()