sasl: Include offered mechanisms in event when no supported mechanisms found

Fri, 03 Mar 2023 12:10:54 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 03 Mar 2023 12:10:54 +0000
changeset 456
6a65142052c8
parent 455
753d6983dc45
child 457
73d4eb93657b

sasl: Include offered mechanisms in event when no supported mechanisms found

This allows consumers of the event to determine what may be required in order
to successfully authenticate.

plugins/sasl.lua file | annotate | diff | comparison | revisions
--- a/plugins/sasl.lua	Wed Aug 03 03:07:16 2022 +0200
+++ b/plugins/sasl.lua	Fri Mar 03 12:10:54 2023 +0000
@@ -32,7 +32,7 @@
 			table.insert(supported, mech);
 		end
 		if not supported[1] then
-			stream:event("authentication-failure", { condition = "no-supported-sasl-mechanisms" });
+			stream:event("authentication-failure", { condition = "no-supported-sasl-mechanisms", mechanisms = mechanisms });
 			stream:close();
 			return;
 		end

mercurial