diff options
author | Kim Alvefur <zash@zash.se> | 2012-05-29 17:20:02 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-05-29 17:20:02 +0200 |
commit | 2ea18c22dc4c6f91f36ca9450e5e7ca27e7a862f (patch) | |
tree | bcbf50045a19242b6dc839d4930c7d1fb7b6d67e /plugins/mod_proxy65.lua | |
parent | 7a3d816c476aeebe5c1157b286ade4067f543ae5 (diff) | |
download | prosody-2ea18c22dc4c6f91f36ca9450e5e7ca27e7a862f.tar.gz prosody-2ea18c22dc4c6f91f36ca9450e5e7ca27e7a862f.zip |
mod_proxy65: Fix ACL
Diffstat (limited to 'plugins/mod_proxy65.lua')
-rw-r--r-- | plugins/mod_proxy65.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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; |