diff --git a/src/controllers/activitypub/index.js b/src/controllers/activitypub/index.js index bda06afc94..ad18451d04 100644 --- a/src/controllers/activitypub/index.js +++ b/src/controllers/activitypub/index.js @@ -48,6 +48,9 @@ Controller.fetch = async (req, res, next) => { helpers.redirect(res, url.href, false); } catch (e) { + if (!url || !url.href) { + return next(); + } activitypub.helpers.log(`[activitypub/fetch] Invalid URL received: ${url}`); helpers.redirect(res, url.href, false); }