From 375db8a3fb81215819e482cb912a1bebe8a403d5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 29 May 2012 17:20:02 +0200 Subject: mod_proxy65: Fix ACL --- plugins/mod_proxy65.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/mod_proxy65.lua') diff --git a/plugins/mod_proxy65.lua b/plugins/mod_proxy65.lua index 951dbcfe..d6e41604 100644 --- a/plugins/mod_proxy65.lua +++ b/plugins/mod_proxy65.lua @@ -124,9 +124,11 @@ function module.add_host(module) -- check ACL while proxy_acl and #proxy_acl > 0 do -- using 'while' instead of 'if' so we can break out of it local jid = stanza.attr.from; + local allow; for _, acl in ipairs(proxy_acl) do - if jid_compare(jid, acl) then break; end + if jid_compare(jid, acl) then allow = true; break; end end + if allow then break; end module:log("warn", "Denying use of proxy for %s", tostring(stanza.attr.from)); origin.send(st.error_reply(stanza, "auth", "forbidden")); return true; -- cgit v1.2.3