diff mod_firewall/mod_firewall.lua @ 6372:81f06628fea4

mod_firewall: Switch to prosody.util.time.now() to get the current time
author Link Mauve <linkmauve@linkmauve.fr>
date Fri, 30 Jan 2026 15:03:21 +0100
parents 254a21a104aa
children 547feb8181eb
line wrap: on
line diff
--- a/mod_firewall/mod_firewall.lua	Tue Jan 27 21:12:21 2026 +0100
+++ b/mod_firewall/mod_firewall.lua	Fri Jan 30 15:03:21 2026 +0100
@@ -204,7 +204,7 @@
 		end
 		return table.concat(defs, " ");
 	end, depends = { "date_time" }; };
-	timestamp = { global_code = [[local get_time = require "socket".gettime;]]; local_code = [[local current_timestamp = get_time();]]; };
+	timestamp = { global_code = [[local get_time = require "prosody.util.time".now;]]; local_code = [[local current_timestamp = get_time();]]; };
 	globalthrottle = {
 		global_code = function (throttle)
 			assert(idsafe(throttle), "Invalid rate limit name: "..throttle);