mod_register: Make sure only an on_evict function or nil is passed to util.cache
authorKim Alvefur <zash@zash.se>
Thu, 17 Mar 2016 22:25:56 +0100
changeset 7296 c4af754d1e1b
parent 7294 688a7f5d3624
child 7297 5f4d0753c818
mod_register: Make sure only an on_evict function or nil is passed to util.cache
plugins/mod_register.lua
--- a/plugins/mod_register.lua	Thu Mar 17 19:14:58 2016 +0000
+++ b/plugins/mod_register.lua	Thu Mar 17 22:25:56 2016 +0100
@@ -187,7 +187,7 @@
 		module:log("info", "Adding ip %s to registration blacklist", ip);
 		blacklisted_ips[ip] = true;
 	end
-end);
+end or nil);
 
 local function check_throttle(ip)
 	if not throttle_max then return true end