aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-09-13 18:48:35 +0100
committerMatthew Wild <mwild1@gmail.com>2012-09-13 18:48:35 +0100
commit839c9a8ac91ab73176e471c641cdc9e43272520c (patch)
treec57282ba632e4e0f332ac691eb238e0a50436b04 /plugins
parent6063b9a08ed5a43d090513ad283acb404aa51522 (diff)
downloadprosody-839c9a8ac91ab73176e471c641cdc9e43272520c.tar.gz
prosody-839c9a8ac91ab73176e471c641cdc9e43272520c.zip
mod_legacyauth: Fix for sending error response to unauthed s2s connections
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_legacyauth.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_legacyauth.lua b/plugins/mod_legacyauth.lua
index dcb652a0..5fb66441 100644
--- a/plugins/mod_legacyauth.lua
+++ b/plugins/mod_legacyauth.lua
@@ -35,7 +35,7 @@ module:hook("stanza/iq/jabber:iq:auth:query", function(event)
local session, stanza = event.origin, event.stanza;
if session.type ~= "c2s_unauthed" then
- session.send(st.error_reply(stanza, "cancel", "service-unavailable", "Legacy authentication is only allowed for unauthenticated client connections."));
+ (session.sends2s or session.send)(st.error_reply(stanza, "cancel", "service-unavailable", "Legacy authentication is only allowed for unauthenticated client connections."));
return true;
end