equal
deleted
inserted
replaced
203 end |
203 end |
204 |
204 |
205 local recent_ips = {}; |
205 local recent_ips = {}; |
206 local min_seconds_between_registrations = module:get_option("min_seconds_between_registrations"); |
206 local min_seconds_between_registrations = module:get_option("min_seconds_between_registrations"); |
207 local whitelist_only = module:get_option("whitelist_registration_only"); |
207 local whitelist_only = module:get_option("whitelist_registration_only"); |
208 local whitelisted_ips = module:get_option("registration_whitelist") or { "127.0.0.1" }; |
208 local whitelisted_ips = module:get_option("registration_whitelist") or { "127.0.0.1", "::1" }; |
209 local blacklisted_ips = module:get_option("registration_blacklist") or {}; |
209 local blacklisted_ips = module:get_option("registration_blacklist") or {}; |
210 |
210 |
211 for _, ip in ipairs(whitelisted_ips) do whitelisted_ips[ip] = true; end |
211 for _, ip in ipairs(whitelisted_ips) do whitelisted_ips[ip] = true; end |
212 for _, ip in ipairs(blacklisted_ips) do blacklisted_ips[ip] = true; end |
212 for _, ip in ipairs(blacklisted_ips) do blacklisted_ips[ip] = true; end |
213 |
213 |