mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: check if url is undefined
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user