Software /
code /
prosody
Changeset
2243:bd17dd75b4a5
Merged with tip.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Fri, 27 Nov 2009 00:19:56 +0100 |
parents | 2242:ee6ac55a72d6 (diff) 2240:373e3fd8b862 (current diff) |
children | 2244:730038d3e9e3 |
files | |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Thu Nov 26 22:25:13 2009 +0000 +++ b/plugins/mod_saslauth.lua Fri Nov 27 00:19:56 2009 +0100 @@ -75,7 +75,7 @@ local function handle_status(session, status) if status == "failure" then - session.sasl_handler = nil; + session.sasl_handler = sesion.sasl_handler:clean_clone(); elseif status == "success" then local username = nodeprep(session.sasl_handler.username); if not username then -- TODO move this to sessionmanager
--- a/util/sasl.lua Thu Nov 26 22:25:13 2009 +0000 +++ b/util/sasl.lua Fri Nov 27 00:19:56 2009 +0100 @@ -90,6 +90,11 @@ return s; end +-- get a fresh clone with the same realm, profiles and forbidden mechanisms +function method:clean_clone() + return new(self.realm, self.profile, self:forbidden()) +end + -- set the forbidden mechanisms function method:forbidden( restrict ) if restrict then