Software /
code /
prosody-modules
Diff
mod_sasl2/mod_sasl2.lua @ 5048:3697d19d5fd9
mod_sasl2: Store client id if provided
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 22 Sep 2022 16:48:05 +0100 |
parent | 5044:f64d834ba744 |
child | 5049:e89aad13a52a |
line wrap: on
line diff
--- a/mod_sasl2/mod_sasl2.lua Thu Sep 22 16:43:51 2022 +0100 +++ b/mod_sasl2/mod_sasl2.lua Thu Sep 22 16:48:05 2022 +0100 @@ -191,6 +191,10 @@ if not sasl_handler:select(mechanism) then return handle_status(session, "failure", "invalid-mechanism"); end + local user_agent = auth:get_child("user-agent"); + if user_agent then + session.client_id = user_agent.attr.id; + end local initial = auth:get_child_text("initial-response"); return process_cdata(session, initial); end);