From def0144dabe675a1e7b63e0322120694b78f09cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Wed, 18 Jan 2017 12:16:26 +0700 Subject: [PATCH] Fix error when no url is provided --- lib/server/controllers/apiController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server/controllers/apiController.js b/lib/server/controllers/apiController.js index 953f981..715a57c 100644 --- a/lib/server/controllers/apiController.js +++ b/lib/server/controllers/apiController.js @@ -24,7 +24,7 @@ var ApiController = function(app) { } // Block requests to unwanted websites (=spam) - if (isBlocked(req.body.url)) { + if (req.body.url && isBlocked(req.body.url)) { console.error('Test blocked for URL: %s', req.body.url); res.status(403).send('Forbidden'); return;