mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: also ignore non-public notes on Update activity
This commit is contained in:
@@ -76,6 +76,11 @@ inbox.create = async (req) => {
|
|||||||
inbox.update = async (req) => {
|
inbox.update = async (req) => {
|
||||||
const { actor, object } = req.body;
|
const { actor, object } = req.body;
|
||||||
|
|
||||||
|
// Temporary, reject non-public notes.
|
||||||
|
if (![...object.to, ...object.cc].includes(activitypub._constants.publicAddress)) {
|
||||||
|
throw new Error('[[error:activitypub.not-implemented]]');
|
||||||
|
}
|
||||||
|
|
||||||
// Origin checking
|
// Origin checking
|
||||||
const actorHostname = new URL(actor).hostname;
|
const actorHostname = new URL(actor).hostname;
|
||||||
const objectHostname = new URL(object.id).hostname;
|
const objectHostname = new URL(object.id).hostname;
|
||||||
|
|||||||
Reference in New Issue
Block a user