Changeset

10765:294923f45e25

mod_register_limits: Fix order of arguments to util.error (fix #1539 p1) (thanks Ge0rG)
author Kim Alvefur <zash@zash.se>
date Thu, 23 Apr 2020 19:00:40 +0200
parents 10764:1fbfcc2f6805
children 10766:00d2a577204c
files plugins/mod_register_limits.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_register_limits.lua	Thu Apr 23 18:42:47 2020 +0200
+++ b/plugins/mod_register_limits.lua	Thu Apr 23 19:00:40 2020 +0200
@@ -82,16 +82,16 @@
 	elseif ip_in_set(blacklisted_ips, ip) then
 		log("debug", "Registration disallowed by blacklist");
 		event.allowed = false;
-		event.error = errors.new("blacklisted", err_registry, event);
+		event.error = errors.new("blacklisted", event, err_registry);
 	elseif (whitelist_only and not ip_in_set(whitelisted_ips, ip)) then
 		log("debug", "Registration disallowed by whitelist");
 		event.allowed = false;
-		event.error = errors.new("not_whitelisted", err_registry, event);
+		event.error = errors.new("not_whitelisted", event, err_registry);
 	elseif throttle_max and not ip_in_set(whitelisted_ips, ip) then
 		if not check_throttle(ip) then
 			log("debug", "Registrations over limit for ip %s", ip or "?");
 			event.allowed = false;
-			event.error = errors.new("throttle", err_registry, event);
+			event.error = errors.new("throttle", event, err_registry);
 		end
 	end
 	if event.error then