aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-04-10 01:31:14 +0200
committerKim Alvefur <zash@zash.se>2018-04-10 01:31:14 +0200
commit6ce8da708c8ccb67e83eb87373eef25c39e8da9e (patch)
tree0b17ed91460dd3e4378d7ebf65d2bcff7ac03a32 /plugins
parent34a61dd7c69289b4e41c3195bc2409a24cfe4ae9 (diff)
downloadprosody-6ce8da708c8ccb67e83eb87373eef25c39e8da9e.tar.gz
prosody-6ce8da708c8ccb67e83eb87373eef25c39e8da9e.zip
mod_register_limits: Use existing local variable
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_register_limits.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_register_limits.lua b/plugins/mod_register_limits.lua
index 685a84bd..bb4ee6f2 100644
--- a/plugins/mod_register_limits.lua
+++ b/plugins/mod_register_limits.lua
@@ -60,7 +60,7 @@ module:hook("user-registering", function (event)
local log = session and session.log or module._log;
if not ip then
log("debug", "User's IP not known; can't apply blacklist/whitelist");
- elseif ip_in_set(blacklisted_ips, event.ip) then
+ elseif ip_in_set(blacklisted_ips, ip) then
log("debug", "Registration disallowed by blacklist");
event.allowed = false;
event.reason = "Your IP address is blacklisted";
@@ -69,7 +69,7 @@ module:hook("user-registering", function (event)
event.allowed = false;
event.reason = "Your IP address is not whitelisted";
elseif throttle_max and not ip_in_set(whitelisted_ips, ip) then
- if not check_throttle(event.ip) then
+ if not check_throttle(ip) then
log("debug", "Registrations over limit for ip %s", ip or "?");
event.allowed = false;
event.reason = "Too many registrations from this IP address recently";