From 00c25d47f986237c668ef5bc9f3f6dfbc6b9deef Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 23 Aug 2017 16:14:08 -0400 Subject: [PATCH] blacklist should not use data.result anymore, just err is fine --- src/meta/blacklist.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/meta/blacklist.js b/src/meta/blacklist.js index 33ce959a0b..77ae32cec3 100644 --- a/src/meta/blacklist.js +++ b/src/meta/blacklist.js @@ -67,14 +67,13 @@ Blacklist.test = function (clientIp, callback) { // return ip.cidrSubnet(subnet).contains(clientIp); }) // not in a blacklisted IPv4 or IPv6 cidr range ) { - plugins.fireHook('filter:blacklist.test', { + plugins.fireHook('filter:blacklist.test', { // To return test failure, pass back an error in callback ip: clientIp, - result: false, - }, function (err, data) { + }, function (err) { if (typeof callback === 'function') { callback(err); } else { - return data.result; + return !!err; } }); } else {