mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 13:05:49 +02:00
fix: regression 218f5ea from via, stricter check on whether the calling user is a remote uid
This commit is contained in:
@@ -89,7 +89,7 @@ module.exports = function (Topics) {
|
|||||||
Topics.post = async function (data) {
|
Topics.post = async function (data) {
|
||||||
data = await plugins.hooks.fire('filter:topic.post', data);
|
data = await plugins.hooks.fire('filter:topic.post', data);
|
||||||
const { uid } = data;
|
const { uid } = data;
|
||||||
const remoteUid = !utils.isNumber(uid);
|
const remoteUid = activitypub.helpers.isUri(uid);
|
||||||
|
|
||||||
const [categoryExists, canCreate, canTag, isAdmin] = await Promise.all([
|
const [categoryExists, canCreate, canTag, isAdmin] = await Promise.all([
|
||||||
parseInt(data.cid, 10) > 0 ? categories.exists(data.cid) : true,
|
parseInt(data.cid, 10) > 0 ? categories.exists(data.cid) : true,
|
||||||
|
|||||||
Reference in New Issue
Block a user