Node.js based forum software built for the modern web
fix(activitypub): group cid check with createish in announce protection
Julian Lam935cb2a16e65
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex b766aaf945..67aeafac09 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -547,9 +547,9 @@ inbox.announce = async (req) => {// Received via relay?const fromRelay = await activitypub.relays.is(actor);- // Protections for non-Creates+ // Protections for non-Creates from category actorsconst createish = object.type === 'Create' || activitypub._constants.acceptedPostTypes.includes(object.type);- if (!createish) {+ if (!createish && cid) {let id = object?.object?.id || object.object; // expecting object referenceconst { id: localId } = await activitypub.helpers.resolveLocalId(id);id = localId || id;