From 4a827b7e7049e126dae19370705b822cc7734245 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 22 Jan 2025 13:12:02 -0500 Subject: [PATCH 1/5] test: adjust webfinger test for updated 404 status code --- test/activitypub/webfinger.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/activitypub/webfinger.js b/test/activitypub/webfinger.js index c408000e9e..c59cb2c0e1 100644 --- a/test/activitypub/webfinger.js +++ b/test/activitypub/webfinger.js @@ -33,12 +33,12 @@ describe('WebFinger endpoint', () => { assert.strictEqual(response.statusCode, 400); }); - it('should return 403 Forbidden if the calling user is not allowed to view the user list/profiles', async () => { + it('should return 404 Not Found if the calling user is not allowed to view the user list/profiles', async () => { await privileges.global.rescind(['groups:view:users'], 'fediverse'); const { response } = await request.get(`${nconf.get('url')}/.well-known/webfinger?resource=acct%3a${slug}%40${host}`); assert(response); - assert.strictEqual(response.statusCode, 400); + assert.strictEqual(response.statusCode, 404); await privileges.global.give(['groups:view:users'], 'fediverse'); }); From b3b8b9e98d148ce78cf56f5dd39952c326fb57ca Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 24 Jan 2025 23:41:19 -0500 Subject: [PATCH 2/5] fix: null checks for category sync and actor assertions --- src/activitypub/actors.js | 2 +- src/api/activitypub.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/activitypub/actors.js b/src/activitypub/actors.js index 7076bf7520..2208f03de7 100644 --- a/src/activitypub/actors.js +++ b/src/activitypub/actors.js @@ -67,7 +67,7 @@ Actors.assert = async (ids, options = {}) => { }))); // Webfinger failures = assertion failure - if (!ids.every(Boolean)) { + if (!ids.length || !ids.every(Boolean)) { return false; } diff --git a/src/api/activitypub.js b/src/api/activitypub.js index 340f402028..36bb35acb5 100644 --- a/src/api/activitypub.js +++ b/src/api/activitypub.js @@ -38,7 +38,7 @@ function enabledCheck(next) { activitypubApi.follow = enabledCheck(async (caller, { type, id, actor } = {}) => { // Privilege checks should be done upstream const assertion = await activitypub.actors.assert(actor); - if (!assertion) { + if (!assertion || !assertion.length) { throw new Error('[[error:activitypub.invalid-id]]'); } From 6918c3f3a4bc42413e2c307d894f3d3f3d2211d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 25 Jan 2025 09:17:13 -0500 Subject: [PATCH 3/5] chore: up themes --- install/package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install/package.json b/install/package.json index e8e55324e2..c57bdb3699 100644 --- a/install/package.json +++ b/install/package.json @@ -108,10 +108,10 @@ "nodebb-plugin-spam-be-gone": "2.3.0", "nodebb-plugin-web-push": "0.7.2", "nodebb-rewards-essentials": "1.0.0", - "nodebb-theme-harmony": "2.0.3", + "nodebb-theme-harmony": "2.0.4", "nodebb-theme-lavender": "7.1.17", - "nodebb-theme-peace": "2.2.33", - "nodebb-theme-persona": "14.0.2", + "nodebb-theme-peace": "2.2.34", + "nodebb-theme-persona": "14.0.3", "nodebb-widget-essentials": "7.0.32", "nodemailer": "6.9.16", "nprogress": "0.2.0", From 10409e0e1e9572c966ddc704b7cc9b14eabeda41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 25 Jan 2025 10:13:54 -0500 Subject: [PATCH 4/5] chore: up harmony --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index c57bdb3699..63e88eb676 100644 --- a/install/package.json +++ b/install/package.json @@ -108,7 +108,7 @@ "nodebb-plugin-spam-be-gone": "2.3.0", "nodebb-plugin-web-push": "0.7.2", "nodebb-rewards-essentials": "1.0.0", - "nodebb-theme-harmony": "2.0.4", + "nodebb-theme-harmony": "2.0.5", "nodebb-theme-lavender": "7.1.17", "nodebb-theme-peace": "2.2.34", "nodebb-theme-persona": "14.0.3", From c95848003c4563eb3108b68a41a2ff07f5cfa27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Sat, 25 Jan 2025 15:00:55 -0500 Subject: [PATCH 5/5] chore: up benchpress --- install/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/package.json b/install/package.json index 63e88eb676..8745c6fb1c 100644 --- a/install/package.json +++ b/install/package.json @@ -44,7 +44,7 @@ "async": "3.2.6", "autoprefixer": "10.4.20", "bcryptjs": "2.4.3", - "benchpressjs": "2.5.1", + "benchpressjs": "2.5.2", "body-parser": "1.20.3", "bootbox": "6.0.0", "bootstrap": "5.3.3",