From 3933a127d26f5f3e4d76f533e9bc002ae92680c4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 8 Feb 2021 16:06:32 +0100 Subject: Ensure we don't receive things from local actors --- server/middlewares/validators/activitypub/activity.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server') diff --git a/server/middlewares/validators/activitypub/activity.ts b/server/middlewares/validators/activitypub/activity.ts index 255d8eb17..e78ef07ef 100644 --- a/server/middlewares/validators/activitypub/activity.ts +++ b/server/middlewares/validators/activitypub/activity.ts @@ -15,7 +15,7 @@ async function activityPubValidator (req: express.Request, res: express.Response const serverActor = await getServerActor() const remoteActor = res.locals.signature.actor - if (serverActor.id === remoteActor.id) { + if (serverActor.id === remoteActor.id || remoteActor.serverId === null) { logger.error('Receiving request in INBOX by ourselves!', req.body) return res.status(HttpStatusCode.CONFLICT_409) .end() -- cgit v1.2.3