# HG changeset patch # User Matthew Wild # Date 1679412363 0 # Node ID 6526b670e66d44fe0400cb704f755be648e92ca9 # Parent a9c1cc91d3d65510c5278aeff1d0bc5d4b4df54a mod_sasl2: Pull user-agent info into sasl_handler for later reference It may be of interest to post-auth things. Putting it on the session was another option considered, but that seemed unnecessary overhead for something that might be rarely used. sasl_handler is cleared after successful authentication. diff -r a9c1cc91d3d6 -r 6526b670e66d mod_sasl2/mod_sasl2.lua --- a/mod_sasl2/mod_sasl2.lua Sun Mar 19 22:21:41 2023 +0100 +++ b/mod_sasl2/mod_sasl2.lua Tue Mar 21 15:26:03 2023 +0000 @@ -208,6 +208,10 @@ local user_agent = auth:get_child("user-agent"); if user_agent then session.client_id = user_agent.attr.id; + sasl_handler.user_agent = { + software = user_agent:get_child_text("software"); + device = user_agent:get_child_text("device"); + }; end local initial = auth:get_child_text("initial-response"); return process_cdata(session, initial);