From 0b66f61fac4167996b9fa27146e793a7dee0a363 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 6 Mar 2017 15:56:12 +0100 Subject: mod_saslauth: Switch to hook_tag from hook_stanza which was renamed in 2087d42f1e77 --- plugins/mod_saslauth.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/mod_saslauth.lua') diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index ee468c17..b3a3aaa9 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -82,7 +82,7 @@ local function sasl_process_cdata(session, stanza) return true; end -module:hook_stanza(xmlns_sasl, "success", function (session, stanza) +module:hook_tag(xmlns_sasl, "success", function (session, stanza) if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end module:log("debug", "SASL EXTERNAL with %s succeeded", session.to_host); session.external_auth = "succeeded" @@ -93,7 +93,7 @@ module:hook_stanza(xmlns_sasl, "success", function (session, stanza) return true; end) -module:hook_stanza(xmlns_sasl, "failure", function (session, stanza) +module:hook_tag(xmlns_sasl, "failure", function (session, stanza) if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end local text = stanza:get_child_text("text"); @@ -114,7 +114,7 @@ module:hook_stanza(xmlns_sasl, "failure", function (session, stanza) return true; end, 500) -module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) +module:hook_tag("http://etherx.jabber.org/streams", "features", function (session, stanza) if session.type ~= "s2sout_unauthed" or not session.secure then return; end local mechanisms = stanza:get_child("mechanisms", xmlns_sasl) -- cgit v1.2.3 From 69990587c92aacfad843fa8f72d49af5870086f5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 6 Mar 2017 16:05:24 +0100 Subject: mod_saslauth: Fix typoed variable name [luacheck] --- plugins/mod_saslauth.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/mod_saslauth.lua') diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index b3a3aaa9..8bbf6349 100644 --- a/plugins/mod_saslauth.lua +++ b/plugins/mod_saslauth.lua @@ -105,7 +105,7 @@ module:hook_tag(xmlns_sasl, "failure", function (session, stanza) end end if text and condition then - condition = connection .. ": " .. text; + condition = condition .. ": " .. text; end module:log("info", "SASL EXTERNAL with %s failed: %s", session.to_host, condition); -- cgit v1.2.3