diff options
author | Kim Alvefur <zash@zash.se> | 2017-03-06 16:05:57 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-03-06 16:05:57 +0100 |
commit | 6403594a10e820f81e9bdffed95d947b7350cca9 (patch) | |
tree | 5a6ccfcd8d9fb6e2f2d1d35910732fba43e61132 /plugins | |
parent | 367037154898857cf54466a6b5eb8889f04006cb (diff) | |
parent | 66618bf09cc664d9375bf41174297714782b4346 (diff) | |
download | prosody-6403594a10e820f81e9bdffed95d947b7350cca9.tar.gz prosody-6403594a10e820f81e9bdffed95d947b7350cca9.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_saslauth.lua | 8 | ||||
-rw-r--r-- | plugins/mod_tls.lua | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/mod_saslauth.lua b/plugins/mod_saslauth.lua index ee468c17..8bbf6349 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"); @@ -105,7 +105,7 @@ module:hook_stanza(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); @@ -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) diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua index fbeb344b..48613b9a 100644 --- a/plugins/mod_tls.lua +++ b/plugins/mod_tls.lua @@ -122,7 +122,7 @@ module:hook("s2s-stream-features", function(event) end); -- For s2sout connections, start TLS if we can -module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) +module:hook_tag("http://etherx.jabber.org/streams", "features", function (session, stanza) module:log("debug", "Received features element"); if can_do_tls(session) and stanza:get_child("starttls", xmlns_starttls) then module:log("debug", "%s is offering TLS, taking up the offer...", session.to_host); @@ -131,7 +131,7 @@ module:hook_stanza("http://etherx.jabber.org/streams", "features", function (ses end end, 500); -module:hook_stanza(xmlns_starttls, "proceed", function (session, stanza) -- luacheck: ignore 212/stanza +module:hook_tag(xmlns_starttls, "proceed", function (session, stanza) -- luacheck: ignore 212/stanza if session.type == "s2sout_unauthed" and can_do_tls(session) then module:log("debug", "Proceeding with TLS on s2sout..."); session:reset_stream(); |