changeset 2404:9af2d36567a8

mod_firewall: Allow conditions to end with a question mark
author Kim Alvefur <zash@zash.se>
date Fri, 02 Dec 2016 11:45:10 +0100
parents f96bdfd81eba
children 7bce126bf60c
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	Wed Nov 30 15:44:35 2016 +0100
+++ b/mod_firewall/mod_firewall.lua	Fri Dec 02 11:45:10 2016 +0100
@@ -305,7 +305,7 @@
 			end
 			-- Check standard modifiers for the condition (e.g. NOT)
 			local negated;
-			local condition = line:match("^[^:=%.]*");
+			local condition = line:match("^[^:=%.?]*");
 			if condition:find("%f[%w]NOT%f[^%w]") then
 				local s, e = condition:match("%f[%w]()NOT()%f[^%w]");
 				condition = (condition:sub(1,s-1)..condition:sub(e+1, -1)):match("^%s*(.-)%s*$");