Software /
code /
prosody-modules
Changeset
4582:cc20493018f6
mod_firewall: Allow underscores in definition names
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 05 Jun 2021 16:22:22 +0100 |
parents | 4581:3e2e708fd18b |
children | 4583:bb8459c220c9 |
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 Tue Jun 01 19:23:32 2021 +0200 +++ b/mod_firewall/mod_firewall.lua Sat Jun 05 16:22:22 2021 +0100 @@ -372,7 +372,7 @@ end ruleset[chain] = ruleset[chain] or {}; elseif not(state) and line:sub(1,1) == "%" then -- Definition (zone, limit, etc.) - local what, name = line:match("^%%%s*(%w+) +([^ :]+)"); + local what, name = line:match("^%%%s*([%w_]+) +([^ :]+)"); if not definition_handlers[what] then return nil, errmsg("Definition of unknown object: "..what); elseif not name or not idsafe(name) then