aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_proxy65.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2013-02-26 23:57:44 +0500
committerWaqas Hussain <waqas20@gmail.com>2013-02-26 23:57:44 +0500
commit7ef80d7a4c7fab8ce75247420f9044ca2b4529c8 (patch)
tree996a4fa5538a4ba9a6cb5e47ba2e73dd4ad89c6e /plugins/mod_proxy65.lua
parent8fe41d1d853c9ab64d7e01582711c02c53f2967b (diff)
downloadprosody-7ef80d7a4c7fab8ce75247420f9044ca2b4529c8.tar.gz
prosody-7ef80d7a4c7fab8ce75247420f9044ca2b4529c8.zip
mod_proxy65: Only handle service discovery requests when no node is present in the request.
Diffstat (limited to 'plugins/mod_proxy65.lua')
-rw-r--r--plugins/mod_proxy65.lua16
1 files changed, 10 insertions, 6 deletions
diff --git a/plugins/mod_proxy65.lua b/plugins/mod_proxy65.lua
index d6e41604..0d05b2ac 100644
--- a/plugins/mod_proxy65.lua
+++ b/plugins/mod_proxy65.lua
@@ -106,16 +106,20 @@ function module.add_host(module)
module:hook("iq-get/host/http://jabber.org/protocol/disco#info:query", function(event)
local origin, stanza = event.origin, event.stanza;
- origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#info")
- :tag("identity", {category='proxy', type='bytestreams', name=name}):up()
- :tag("feature", {var="http://jabber.org/protocol/bytestreams"}) );
- return true;
+ if not stanza.tags[1].attr.node then
+ origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#info")
+ :tag("identity", {category='proxy', type='bytestreams', name=name}):up()
+ :tag("feature", {var="http://jabber.org/protocol/bytestreams"}) );
+ return true;
+ end
end, -1);
module:hook("iq-get/host/http://jabber.org/protocol/disco#items:query", function(event)
local origin, stanza = event.origin, event.stanza;
- origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#items"));
- return true;
+ if not stanza.tags[1].attr.node then
+ origin.send(st.reply(stanza):query("http://jabber.org/protocol/disco#items"));
+ return true;
+ end
end, -1);
module:hook("iq-get/host/http://jabber.org/protocol/bytestreams:query", function(event)