Changeset

1832:a805e4fe104a

mod_legacyauth: Undo auth on bind fail. Legacy auth is atomic.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 27 Sep 2009 15:30:01 +0500
parents 1831:ced7a6b8bcd0
children 1833:5408d5100bd0
files plugins/mod_legacyauth.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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