aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-02-08 16:06:32 +0100
committerChocobozzz <me@florianbigard.com>2021-02-08 16:06:32 +0100
commit3933a127d26f5f3e4d76f533e9bc002ae92680c4 (patch)
tree524f87bf287c7098f69f2dc21076ccdb27f8e3a4 /server
parent0c39df2536b600bd2e46c78b8e7dbe9476a35c8d (diff)
downloadPeerTube-3933a127d26f5f3e4d76f533e9bc002ae92680c4.tar.gz
PeerTube-3933a127d26f5f3e4d76f533e9bc002ae92680c4.tar.zst
PeerTube-3933a127d26f5f3e4d76f533e9bc002ae92680c4.zip
Ensure we don't receive things from local actors
Diffstat (limited to 'server')
-rw-r--r--server/middlewares/validators/activitypub/activity.ts2
1 files changed, 1 insertions, 1 deletions
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
15 15
16 const serverActor = await getServerActor() 16 const serverActor = await getServerActor()
17 const remoteActor = res.locals.signature.actor 17 const remoteActor = res.locals.signature.actor
18 if (serverActor.id === remoteActor.id) { 18 if (serverActor.id === remoteActor.id || remoteActor.serverId === null) {
19 logger.error('Receiving request in INBOX by ourselves!', req.body) 19 logger.error('Receiving request in INBOX by ourselves!', req.body)
20 return res.status(HttpStatusCode.CONFLICT_409) 20 return res.status(HttpStatusCode.CONFLICT_409)
21 .end() 21 .end()