Mercurial > prosody-modules
diff mod_firewall/conditions.lib.lua @ 2127:59023dffbdd4
mod_firewall: Allow underscore in mark names (thanks Ge0rG)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 18 Mar 2016 09:45:02 +0000 |
parents | edf5cf3c474b |
children | 21bc4d7cddae |
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua Thu Mar 17 21:30:09 2016 +0000 +++ b/mod_firewall/conditions.lib.lua Fri Mar 18 09:45:02 2016 +0000 @@ -187,9 +187,9 @@ end function condition_handlers.ORIGIN_MARKED(name_and_time) - local name, time = name_and_time:match("^%s*(%w+)%s+%(([^)]+)s%)%s*$"); + local name, time = name_and_time:match("^%s*([%w_]+)%s+%(([^)]+)s%)%s*$"); if not name then - name = name_and_time:match("^%s*(%w+)%s*$"); + name = name_and_time:match("^%s*([%w_]+)%s*$"); end if not name then error("Error parsing mark name, see documentation for usage examples");