mod_disco: Don't add caps hash to stream features on unauthenticated connections.
authorWaqas Hussain <waqas20@gmail.com>
Fri, 03 Dec 2010 00:37:54 +0500
changeset 3695 d2c4856c7ed5
parent 3694 a7d88f58abbb
child 3696 a96f275c42b5
mod_disco: Don't add caps hash to stream features on unauthenticated connections.
plugins/mod_disco.lua
--- a/plugins/mod_disco.lua	Fri Dec 03 00:29:44 2010 +0500
+++ b/plugins/mod_disco.lua	Fri Dec 03 00:37:54 2010 +0500
@@ -115,7 +115,9 @@
 
 -- Handle caps stream feature
 module:hook("stream-features", function (event)
-	event.features:add_child(get_server_caps_feature());
+	if event.origin.type == "c2s" then
+		event.features:add_child(get_server_caps_feature());
+	end
 end);
 
 -- Handle disco requests to user accounts