From 3c30d3f0aacaf33786c41f1405ab43e1a800ce3b Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Tue, 17 Jan 2017 11:10:25 +0200 Subject: [PATCH] [Minor] URL reputation: avoid sending bad queries to Redis --- src/plugins/lua/url_reputation.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/url_reputation.lua b/src/plugins/lua/url_reputation.lua index 7366c1f11..202cb4496 100644 --- a/src/plugins/lua/url_reputation.lua +++ b/src/plugins/lua/url_reputation.lua @@ -213,8 +213,6 @@ local function tags_save(task) -- Save tags to redis and insert symbol local function insert_results() task:insert_result(settings.symbols[scale[reputation]], 1.0, which) - -- Abort if no tags were found - if not next(tags) then return end -- Don't populate old tags local old_tags = task:get_mempool():get_variable('urltags') if old_tags then @@ -236,6 +234,8 @@ local function tags_save(task) end end end + -- Abort if no tags were found + if not next(tags) then return end -- Prepare arguments to send to Redis local redis_keys = {} local redis_args = {} -- 2.39.5