--- a/plugins/mod_register_limits.lua Mon Apr 09 22:05:49 2018 +0200
+++ b/plugins/mod_register_limits.lua Tue Apr 10 01:31:14 2018 +0200
@@ -60,7 +60,7 @@
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 @@
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";