From ec98274a21953200ae89e504e6bdefea9e1e2bba Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 13 Sep 2012 18:48:35 +0100 Subject: mod_legacyauth: Fix for sending error response to unauthed s2s connections --- plugins/mod_legacyauth.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_legacyauth.lua') 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 -- cgit v1.2.3