Diff

mod_firewall/mod_firewall.lua @ 2101:41a0a9db89ef

mod_firewall: Allow actions to have underscores in their names
author Matthew Wild <mwild1@gmail.com>
date Thu, 17 Mar 2016 11:22:49 +0000
parent 2100:cbd0095e9302
child 2113:d75145297bf9
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Thu Mar 17 11:22:35 2016 +0000
+++ b/mod_firewall/mod_firewall.lua	Thu Mar 17 11:22:49 2016 +0000
@@ -221,7 +221,7 @@
 			end
 			state = "actions";
 			-- Action handlers?
-			local action = line:match("^%P+");
+			local action = line:match("^[%w_]+");
 			if not action_handlers[action] then
 				return nil, ("Unknown action on line %d: %s"):format(line_no, action or "<unknown>");
 			end