mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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);
|
helpers.redirect(res, url.href, false);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (!url || !url.href) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
activitypub.helpers.log(`[activitypub/fetch] Invalid URL received: ${url}`);
|
activitypub.helpers.log(`[activitypub/fetch] Invalid URL received: ${url}`);
|
||||||
helpers.redirect(res, url.href, false);
|
helpers.redirect(res, url.href, false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user