Software /
code /
prosody-modules
Changeset
5048:3697d19d5fd9
mod_sasl2: Store client id if provided
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 22 Sep 2022 16:48:05 +0100 |
parents | 5047:023f21bfcc08 |
children | 5049:e89aad13a52a |
files | mod_sasl2/mod_sasl2.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
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);