mod_log_auth: Attempt to retrieve attempted username from SASL handler (re #844)

Wed, 19 Apr 2017 06:37:29 +0200

author
Kim Alvefur <zash@zash.se>
date
Wed, 19 Apr 2017 06:37:29 +0200
changeset 2696
404d47d2e833
parent 2695
8b21f13b08c5
child 2697
d18a91c030df

mod_log_auth: Attempt to retrieve attempted username from SASL handler (re #844)

mod_log_auth/mod_log_auth.lua file | annotate | diff | comparison | revisions
--- a/mod_log_auth/mod_log_auth.lua	Wed Apr 19 06:36:52 2017 +0200
+++ b/mod_log_auth/mod_log_auth.lua	Wed Apr 19 06:37:29 2017 +0200
@@ -6,7 +6,7 @@
 	module:hook("authentication-failure", function (event)
 		local session = event.session;
 		module:log("info", "Failed authentication attempt (%s) for user %s from IP: %s",
-			event.condition or "unknown-condition", session.username or "?", session.ip or "?");
+			event.condition or "unknown-condition", session.username or session.sasl_handler.username or "?", session.ip or "?");
 	end);
 end
 

mercurial