From fa204b9d3326e2e8f8cee29685c2f0ee53cfdb33 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 17 Mar 2016 22:25:56 +0100 Subject: mod_register: Make sure only an on_evict function or nil is passed to util.cache --- plugins/mod_register.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_register.lua b/plugins/mod_register.lua index e4b4bd51..fda717f7 100644 --- a/plugins/mod_register.lua +++ b/plugins/mod_register.lua @@ -187,7 +187,7 @@ local throttle_cache = new_cache(throttle_cache_size, blacklist_overflow and fun 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 -- cgit v1.2.3 From 6a52a3feac921cd4263de3771a8984955f6c6bda Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 18 Mar 2016 00:08:33 +0100 Subject: mod_websocket: Make sure stanza xmlns filter runs late in the chain --- plugins/mod_websocket.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua index 418cd846..274e587a 100644 --- a/plugins/mod_websocket.lua +++ b/plugins/mod_websocket.lua @@ -275,7 +275,7 @@ function handle_request(event) attr["xmlns:stream"] = attr["xmlns:stream"] or xmlns_streams; end return stanza; - end); + end, -1000); add_filter(session, "bytes/out", function(data) return build_frame({ FIN = true, opcode = 0x01, data = tostring(data)}); -- cgit v1.2.3