mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
feat: fine-grained privileges integration for fediverse users and world pseudo-category
This commit is contained in:
@@ -48,7 +48,7 @@ middleware.validate = async function (req, res, next) {
|
||||
const { actor, object } = req.body;
|
||||
|
||||
// Origin checking
|
||||
if (typeof object !== 'string') {
|
||||
if (typeof object !== 'string' && object.hasOwnProperty('id')) {
|
||||
const actorHostname = new URL(actor).hostname;
|
||||
const objectHostname = new URL(object.id).hostname;
|
||||
if (actorHostname !== objectHostname) {
|
||||
|
||||
Reference in New Issue
Block a user