Software /
code /
prosody-modules
Changeset
6149:045abdc53ba4
mod_sasl2: Reset SASL handler after failed authentication
mod_saslauth already does this, and we should be too. It allows re-attempting
authentication after failure.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 16 Jan 2025 15:44:24 +0000 |
parents | 6148:c90aab23fb9b |
children | 6150:f77f5e408d6a |
files | mod_sasl2/mod_sasl2.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_sasl2/mod_sasl2.lua Sat Jan 11 12:12:18 2025 +0100 +++ b/mod_sasl2/mod_sasl2.lua Thu Jan 16 15:44:24 2025 +0000 @@ -125,6 +125,9 @@ module:hook("sasl2/c2s/failure", function (event) module:fire_event("authentication-failure", event); local session, condition, text = event.session, event.message, event.error_text; + + session.sasl_handler = session.sasl_handler:clean_clone(); + local failure = st.stanza("failure", { xmlns = xmlns_sasl2 }) :tag(condition, { xmlns = "urn:ietf:params:xml:ns:xmpp-sasl" }):up(); if text then