aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-04-23 19:00:40 +0200
committerKim Alvefur <zash@zash.se>2020-04-23 19:00:40 +0200
commit4923e7f87fd5d1a8ad077ffa1c28c664280af9b2 (patch)
treebd58c9e6662c22d7577051b4214b695592fb0513
parent4d54d3e1352e11519002d917f4d24267d0776bd7 (diff)
downloadprosody-4923e7f87fd5d1a8ad077ffa1c28c664280af9b2.tar.gz
prosody-4923e7f87fd5d1a8ad077ffa1c28c664280af9b2.zip
mod_register_limits: Fix order of arguments to util.error (fix #1539 p1) (thanks Ge0rG)
-rw-r--r--plugins/mod_register_limits.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/mod_register_limits.lua b/plugins/mod_register_limits.lua
index fc9bf27a..7a504b32 100644
--- a/plugins/mod_register_limits.lua
+++ b/plugins/mod_register_limits.lua
@@ -82,16 +82,16 @@ module:hook("user-registering", function (event)
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