Browse Source

Fix error when no url is provided

Gaël Métais 8 years ago
parent
commit
def0144dab
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/server/controllers/apiController.js

+ 1 - 1
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;