Node.js based forum software built for the modern web
fix: don't sign outgoing gets if id is 0
Julian Lamc05179b887ed
diff --git a/src/activitypub/index.js b/src/activitypub/index.jsindex 0a86fefd3b..e52d183da6 100644--- a/src/activitypub/index.js+++ b/src/activitypub/index.js@@ -404,8 +404,12 @@ ActivityPub.get = async (type, id, uri, options) => {return cached;}- const keyData = await ActivityPub.getPrivateKey(type, id);- const headers = id >= 0 ? await ActivityPub.sign(keyData, uri) : {};+ let headers = {};+ if (parseInt(id, 10) > 0) {+ const keyData = await ActivityPub.getPrivateKey(type, id);+ headers = id >= 0 ? await ActivityPub.sign(keyData, uri) : {};+ }+ActivityPub.helpers.log(`[activitypub/get] ${uri}`);try {const { response, body } = await request.get(uri, {