diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-08 16:06:32 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-08 16:06:32 +0100 |
commit | 3933a127d26f5f3e4d76f533e9bc002ae92680c4 (patch) | |
tree | 524f87bf287c7098f69f2dc21076ccdb27f8e3a4 /server/middlewares/validators | |
parent | 0c39df2536b600bd2e46c78b8e7dbe9476a35c8d (diff) | |
download | PeerTube-3933a127d26f5f3e4d76f533e9bc002ae92680c4.tar.gz PeerTube-3933a127d26f5f3e4d76f533e9bc002ae92680c4.tar.zst PeerTube-3933a127d26f5f3e4d76f533e9bc002ae92680c4.zip |
Ensure we don't receive things from local actors
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r-- | server/middlewares/validators/activitypub/activity.ts | 2 |
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() |