Ensure we don't receive things from local actors
This commit is contained in:
parent
0c39df2536
commit
3933a127d2
|
@ -15,7 +15,7 @@ async function activityPubValidator (req: express.Request, res: express.Response
|
||||||
|
|
||||||
const serverActor = await getServerActor()
|
const serverActor = await getServerActor()
|
||||||
const remoteActor = res.locals.signature.actor
|
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)
|
logger.error('Receiving request in INBOX by ourselves!', req.body)
|
||||||
return res.status(HttpStatusCode.CONFLICT_409)
|
return res.status(HttpStatusCode.CONFLICT_409)
|
||||||
.end()
|
.end()
|
||||||
|
|
Loading…
Reference in New Issue