comparison mod_firewall/conditions.lib.lua @ 2116:2bb42ba342f3

mod_firewall: Fix usage of incorrect variable current_time in ORIGIN_MARKED condition (thanks Ge0rG)
author Matthew Wild <mwild1@gmail.com>
date Thu, 17 Mar 2016 12:27:48 +0000
parents 9db4113d0cb5
children 5f6c18fd0161
comparison
equal deleted inserted replaced
2115:2ae5286f1b9a 2116:2bb42ba342f3
192 end 192 end
193 if not name then 193 if not name then
194 error("Error parsing mark name, see documentation for usage examples"); 194 error("Error parsing mark name, see documentation for usage examples");
195 end 195 end
196 if time then 196 if time then
197 return ("(current_time - (session.firewall_marked_%s or 0)) < %d"):format(idsafe(name), tonumber(time)), { "timestamp" }; 197 return ("(current_timestamp - (session.firewall_marked_%s or 0)) < %d"):format(idsafe(name), tonumber(time)), { "timestamp" };
198 end 198 end
199 return ("not not session.firewall_marked_"..idsafe(name)); 199 return ("not not session.firewall_marked_"..idsafe(name));
200 end 200 end
201 201
202 return condition_handlers; 202 return condition_handlers;