# HG changeset patch # User Kim Alvefur # Date 1457716684 -3600 # Node ID de15606f3669e632830e42ddeee962a01ac2aecf # Parent eda5c54dfa30f37103eb77d4e9e57be8f4ed9c9b mod_firewall: Verify that JID part exists before attempting to call method diff -r eda5c54dfa30 -r de15606f3669 mod_firewall/conditions.lib.lua --- a/mod_firewall/conditions.lib.lua Fri Mar 11 18:16:38 2016 +0100 +++ b/mod_firewall/conditions.lib.lua Fri Mar 11 18:18:04 2016 +0100 @@ -33,7 +33,7 @@ else pattern = pattern:gsub("%p", "%%%0"):gsub("%%(%p)", wildcard_equivs); end - return ("%s:match(%q)"):format(part, "^"..pattern.."$"); + return ("(%s and %s:match(%q))"):format(part, part, "^"..pattern.."$"); else return ("%s == %q"):format(part, match); end