mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 00:36:15 +02:00
Revert "feat: add domain blocklist check in activitypub middleware"
This was already done later in the file.
This reverts commit 8e5e208607.
This commit is contained in:
@@ -76,14 +76,6 @@ middleware.assertPayload = helpers.try(async function (req, res, next) {
|
||||
return res.sendStatus(403);
|
||||
}
|
||||
|
||||
// Domain check against blocklists
|
||||
const { hostname } = new URL(req.body.actor);
|
||||
const isAllowed = await activitypub.blocklists.check(hostname);
|
||||
if (!isAllowed) {
|
||||
activitypub.helpers.log(`[middleware/activitypub] Blocked incoming activity from ${hostname} due to blocklist.`);
|
||||
return res.sendStatus(403);
|
||||
}
|
||||
|
||||
// Sanity-check payload schema
|
||||
const required = ['id', 'type', 'actor', 'object'];
|
||||
if (!required.every(prop => req.body.hasOwnProperty(prop))) {
|
||||
|
||||
Reference in New Issue
Block a user