Changeset

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 2126:b0d711cd3da5
children 2128:21bc4d7cddae
files mod_firewall/conditions.lib.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
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");