diff options
author | Andrew Lewis <nerf@judo.za.org> | 2017-01-17 11:10:25 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2017-01-17 11:10:25 +0200 |
commit | 3c30d3f0aacaf33786c41f1405ab43e1a800ce3b (patch) | |
tree | 255c5b25ace5671c4412d13d82771ced0c4e83e4 | |
parent | 03eb1c0ac161ffe6243297429ddc664bf6bb4923 (diff) | |
download | rspamd-3c30d3f0aacaf33786c41f1405ab43e1a800ce3b.tar.gz rspamd-3c30d3f0aacaf33786c41f1405ab43e1a800ce3b.zip |
[Minor] URL reputation: avoid sending bad queries to Redis
-rw-r--r-- | src/plugins/lua/url_reputation.lua | 4 |
1 files 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 = {} |