Node.js based forum software built for the modern web
fix: crash in resolveInboxes
Barış Soner Uşaklı9900171f24f2
diff --git a/src/activitypub/index.js b/src/activitypub/index.jsindex 5971c69326..e64dd66d6b 100644--- a/src/activitypub/index.js+++ b/src/activitypub/index.js@@ -119,8 +119,13 @@ ActivityPub.resolveInboxes = async (ids) => {if (!meta.config.activitypubAllowLoopback) {ids = ids.filter((id) => {- const { hostname } = new URL(id);- return hostname !== nconf.get('url_parsed').hostname;+ try {+ const { hostname } = new URL(id);+ return hostname !== nconf.get('url_parsed').hostname;+ } catch (err) {+ winston.error(`[activitypub/resolveInboxes] Invalid id: ${id}`);+ return false;+ }});}