Comparison

plugins/mod_saslauth.lua @ 5535:0df0afc041d7

mod_saslauth, mod_compression: Fix some cases where open_stream() was not being passed to/from (see df3c78221f26 and issue #338)
author Matthew Wild <mwild1@gmail.com>
date Mon, 29 Apr 2013 10:43:44 +0100
parent 5362:612467e263af
child 5776:bd0ff8ae98a8
child 6033:0d6f23049e95
comparison
equal deleted inserted replaced
5533:df3c78221f26 5535:0df0afc041d7
85 module:hook_stanza(xmlns_sasl, "success", function (session, stanza) 85 module:hook_stanza(xmlns_sasl, "success", function (session, stanza)
86 if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end 86 if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end
87 module:log("debug", "SASL EXTERNAL with %s succeeded", session.to_host); 87 module:log("debug", "SASL EXTERNAL with %s succeeded", session.to_host);
88 session.external_auth = "succeeded" 88 session.external_auth = "succeeded"
89 session:reset_stream(); 89 session:reset_stream();
90 session:open_stream(); 90 session:open_stream(session.from_host, session.to_host);
91 91
92 module:fire_event("s2s-authenticated", { session = session, host = session.to_host }); 92 module:fire_event("s2s-authenticated", { session = session, host = session.to_host });
93 return true; 93 return true;
94 end) 94 end)
95 95