Changeset

4505:b1e10c327d66

mod_saslauth: Fire authentication-failure if make_authenticated() failed.
author Kim Alvefur <zash@zash.se>
date Sun, 12 Feb 2012 15:08:12 +0100
parents 4504:55b61221ecb8
children 4506:6643c9753453
files plugins/mod_saslauth.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Sun Feb 12 15:05:31 2012 +0100
+++ b/plugins/mod_saslauth.lua	Sun Feb 12 15:08:12 2012 +0100
@@ -60,6 +60,7 @@
 			session:reset_stream();
 		else
 			module:log("warn", "SASL succeeded but username was invalid");
+			module:fire_event("authentication-failure", { session = session, condition = "not-authorized", text = err });
 			session.sasl_handler = session.sasl_handler:clean_clone();
 			return "failure", "not-authorized", "User authenticated successfully, but username was invalid";
 		end