mod_legacyauth: Undo auth on bind fail. Legacy auth is atomic.

Sun, 27 Sep 2009 15:30:01 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 27 Sep 2009 15:30:01 +0500
changeset 1829
a805e4fe104a
parent 1828
ced7a6b8bcd0
child 1830
5408d5100bd0

mod_legacyauth: Undo auth on bind fail. Legacy auth is atomic.

plugins/mod_legacyauth.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_legacyauth.lua	Sun Sep 27 15:21:08 2009 +0500
+++ b/plugins/mod_legacyauth.lua	Sun Sep 27 15:30:01 2009 +0500
@@ -60,6 +60,7 @@
 						success, err_type, err, err_msg = sessionmanager.bind_resource(session, resource);
 						if not success then
 							session.send(st.error_reply(stanza, err_type, err, err_msg));
+							session.username, session.type = nil, "c2s_unauthed"; -- FIXME should this be placed in sessionmanager?
 							return true;
 						end
 					end

mercurial