From 65f0673dba3062d70c5d4a71dff0d0003128b761 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sun, 30 Jan 2022 13:14:56 -0800 Subject: [PATCH] Add a sanity check to make sure the actor IRI exists --- activitypub/inbox/worker.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/activitypub/inbox/worker.go b/activitypub/inbox/worker.go index 03e5c985f..2d0fd9403 100644 --- a/activitypub/inbox/worker.go +++ b/activitypub/inbox/worker.go @@ -71,6 +71,10 @@ func Verify(request *http.Request) (bool, error) { return false, errors.Wrap(err, "failed to resolve actor from IRI to fetch key") } + if actor.ActorIri == nil { + return false, errors.New("actor IRI is empty") + } + // Test to see if the actor is in the list of blocked federated domains. if isBlockedDomain(actor.ActorIri.Hostname()) { return false, errors.New("domain is blocked")