comparison mod_firewall/conditions.lib.lua @ 2534:13b8c31dce01

mod_firewall: Fix SCAN to pass correct variable to scan_list()
author Matthew Wild <mwild1@gmail.com>
date Mon, 20 Feb 2017 13:12:51 +0000
parents 3fe4ca2b55c2
children acdc1767a715
comparison
equal deleted inserted replaced
2533:9aed7f4e9f07 2534:13b8c31dce01
273 function condition_handlers.SCAN(scan_expression) 273 function condition_handlers.SCAN(scan_expression)
274 local search_name, pattern_name, list_name = scan_expression:match("(%S+) for (%S+) in (%S+)$"); 274 local search_name, pattern_name, list_name = scan_expression:match("(%S+) for (%S+) in (%S+)$");
275 if not (search_name) then 275 if not (search_name) then
276 error("Error parsing SCAN expression, syntax: SEARCH for PATTERN in LIST"); 276 error("Error parsing SCAN expression, syntax: SEARCH for PATTERN in LIST");
277 end 277 end
278 return ("scan_list(%s, %s)"):format(list_name, "tokens_"..search_name.."_"..pattern_name), { "scan_list", "tokens:"..search_name.."_"..pattern_name, "list:"..list_name }; 278 return ("scan_list(list_%s, %s)"):format(list_name, "tokens_"..search_name.."_"..pattern_name), { "scan_list", "tokens:"..search_name.."_"..pattern_name, "list:"..list_name };
279 end 279 end
280 280
281 return condition_handlers; 281 return condition_handlers;