Changeset

5023:90772a9c92a0

mod_sasl2: Include additional-data in SASL success response
author Matthew Wild <mwild1@gmail.com>
date Sun, 28 Aug 2022 15:03:58 +0100
parents 5022:97d34d520cfa
children 5024:1cb762f72a91
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	Sun Aug 28 15:50:39 2022 +0200
+++ b/mod_sasl2/mod_sasl2.lua	Sun Aug 28 15:03:58 2022 +0100
@@ -94,6 +94,9 @@
 		return true;
 	end
 	event.success = st.stanza("success", { xmlns = xmlns_sasl2 });
+	if event.message then
+		event.success:text_tag("additional-data", base64.encode(event.message));
+	end
 end, 1000);
 
 module:hook("sasl2/c2s/success", function (event)