Mercurial > prosody-modules
changeset 6504:ce716e5e0fee
mod_firewall: Fix chain name check - custom chains should begin with 'user/'
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 26 Mar 2026 13:42:10 +0000 |
| parents | 74774ec3af1d |
| children | cab3e1fbd424 |
| files | mod_firewall/mod_firewall.lua |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua Thu Mar 26 13:41:36 2026 +0000 +++ b/mod_firewall/mod_firewall.lua Thu Mar 26 13:42:10 2026 +0000 @@ -703,7 +703,7 @@ events_hooked[event_name] = handler; module:hook(event_name, handler, chain_definition.priority); end - elseif not chain:sub(1, 5) == "user/" then + elseif chain:sub(1, 5) ~= "user/" then module:log("warn", "Unknown chain %q", chain); end local event_name, handler = "firewall/chains/"..chain, new_handler(false);
