comparison mod_firewall/conditions.lib.lua @ 2072:eda5c54dfa30

mod_firewall: Anchor pattern at beginning and end
author Kim Alvefur <zash@zash.se>
date Fri, 11 Mar 2016 18:16:38 +0100
parents 4161ff87e5a4
children de15606f3669
comparison
equal deleted inserted replaced
2071:4161ff87e5a4 2072:eda5c54dfa30
21 21
22 local function compile_jid_match_part(part, match) 22 local function compile_jid_match_part(part, match)
23 if not match then 23 if not match then
24 return part.." == nil"; 24 return part.." == nil";
25 end 25 end
26 local pattern = match:match("<(.*)>"); 26 local pattern = match:match("^<(.*)>$");
27 if pattern then 27 if pattern then
28 if pattern == "*" then 28 if pattern == "*" then
29 return part; 29 return part;
30 end 30 end
31 if pattern:find("^<.*>$") then 31 if pattern:find("^<.*>$") then