Mercurial > prosody-modules
diff 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 |
line wrap: on
line diff
--- a/mod_firewall/conditions.lib.lua Thu Mar 17 12:11:12 2016 +0000 +++ b/mod_firewall/conditions.lib.lua Thu Mar 17 12:27:48 2016 +0000 @@ -194,7 +194,7 @@ error("Error parsing mark name, see documentation for usage examples"); end if time then - return ("(current_time - (session.firewall_marked_%s or 0)) < %d"):format(idsafe(name), tonumber(time)), { "timestamp" }; + return ("(current_timestamp - (session.firewall_marked_%s or 0)) < %d"):format(idsafe(name), tonumber(time)), { "timestamp" }; end return ("not not session.firewall_marked_"..idsafe(name)); end