From b2c78d1b079e5880b908b27bebebb2a140ae2d4b Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 4 Jun 2018 16:50:48 +0100 Subject: [PATCH] [Fix] Fix matching patterns with no paths --- src/plugins/lua/phishing.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua index e76ffc79a..69aec219f 100644 --- a/src/plugins/lua/phishing.lua +++ b/src/plugins/lua/phishing.lua @@ -75,8 +75,12 @@ local function phishing_cb(task) for _,d in ipairs(elt) do if not d['path'] then found_path = true + end + + if query and d['query'] and query == d['query'] then + found_query = true + elseif not d['query'] then found_query = true - break end end end @@ -101,7 +105,10 @@ local function phishing_cb(task) task:insert_result(phish_symbol, 1.0, args) else -- Host + path match - task:insert_result(phish_symbol, 0.3, args) + if path then + task:insert_result(phish_symbol, 0.3, args) + end + -- No path, no symbol end else if url:is_phished() then -- 2.39.5