From: Andrew Lewis Date: Tue, 17 Jan 2017 09:10:25 +0000 (+0200) Subject: [Minor] URL reputation: avoid sending bad queries to Redis X-Git-Tag: 1.5.0~331^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c30d3f0aacaf33786c41f1405ab43e1a800ce3b;p=thirdparty%2Frspamd.git [Minor] URL reputation: avoid sending bad queries to Redis --- diff --git a/src/plugins/lua/url_reputation.lua b/src/plugins/lua/url_reputation.lua index 7366c1f110..202cb44965 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 = {}