diff options
author | Kim Alvefur <zash@zash.se> | 2020-04-23 19:00:40 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-04-23 19:00:40 +0200 |
commit | 77efec64cd4ea8e5ac11492e355610d56f1a7cf8 (patch) | |
tree | bd58c9e6662c22d7577051b4214b695592fb0513 /plugins | |
parent | 40788f772440e610aa50936e330f5a067ae6fd58 (diff) | |
download | prosody-77efec64cd4ea8e5ac11492e355610d56f1a7cf8.tar.gz prosody-77efec64cd4ea8e5ac11492e355610d56f1a7cf8.zip |
mod_register_limits: Fix order of arguments to util.error (fix #1539 p1) (thanks Ge0rG)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_register_limits.lua | 6 |
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 |