]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Ensure we don't receive things from local actors
authorChocobozzz <me@florianbigard.com>
Mon, 8 Feb 2021 15:06:32 +0000 (16:06 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 8 Feb 2021 15:06:32 +0000 (16:06 +0100)
server/middlewares/validators/activitypub/activity.ts

index 255d8eb17933c9e798ef75036c0564c5a4c8e823..e78ef07ef95a733fd9efaf41a6a7926a9c1305d3 100644 (file)
@@ -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()