diff --git a/core/frontend/apps/subscribers/lib/router.js b/core/frontend/apps/subscribers/lib/router.js index 6c971d6e16..bb126f7645 100644 --- a/core/frontend/apps/subscribers/lib/router.js +++ b/core/frontend/apps/subscribers/lib/router.js @@ -59,6 +59,9 @@ function santizeUrl(url) { } function handleSource(req, res, next) { + if (!req.body.location) { + return next(new Error('Missing location property')); + } req.body.subscribed_url = santizeUrl(req.body.location); req.body.subscribed_referrer = santizeUrl(req.body.referrer);