Software / code / prosody
Comparison
plugins/mod_register.lua @ 8183:49a682d6b427
mod_register: Add ::1 to the default registration_whitelist.
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
|---|---|
| date | Sun, 16 Jul 2017 19:25:29 +0100 |
| parent | 8070:2db6746d2df8 |
| child | 8192:4354f556c5db |
comparison
equal
deleted
inserted
replaced
| 8182:048a83433295 | 8183:49a682d6b427 |
|---|---|
| 180 end | 180 end |
| 181 end | 181 end |
| 182 | 182 |
| 183 local min_seconds_between_registrations = module:get_option_number("min_seconds_between_registrations"); | 183 local min_seconds_between_registrations = module:get_option_number("min_seconds_between_registrations"); |
| 184 local whitelist_only = module:get_option_boolean("whitelist_registration_only"); | 184 local whitelist_only = module:get_option_boolean("whitelist_registration_only"); |
| 185 local whitelisted_ips = module:get_option_set("registration_whitelist", { "127.0.0.1" })._items; | 185 local whitelisted_ips = module:get_option_set("registration_whitelist", { "127.0.0.1", "::1" })._items; |
| 186 local blacklisted_ips = module:get_option_set("registration_blacklist", {})._items; | 186 local blacklisted_ips = module:get_option_set("registration_blacklist", {})._items; |
| 187 | 187 |
| 188 local throttle_max = module:get_option_number("registration_throttle_max", min_seconds_between_registrations and 1); | 188 local throttle_max = module:get_option_number("registration_throttle_max", min_seconds_between_registrations and 1); |
| 189 local throttle_period = module:get_option_number("registration_throttle_period", min_seconds_between_registrations); | 189 local throttle_period = module:get_option_number("registration_throttle_period", min_seconds_between_registrations); |
| 190 local throttle_cache_size = module:get_option_number("registration_throttle_cache_size", 100); | 190 local throttle_cache_size = module:get_option_number("registration_throttle_cache_size", 100); |