Diff

util/sasl/plain.lua @ 2209:adbedc32d41b

Fail if username or password don't pass SASLprep.
author Tobias Markmann <tm@ayena.de>
date Thu, 19 Nov 2009 17:08:58 +0100
parent 2200:dd0b250cb6c4
child 2210:78c9b5255b27
line wrap: on
line diff
--- a/util/sasl/plain.lua	Thu Nov 19 16:44:37 2009 +0100
+++ b/util/sasl/plain.lua	Thu Nov 19 17:08:58 2009 +0100
@@ -34,7 +34,8 @@
 	password = saslprep(password);
 	
 	if (not password) or (password == "") or (not authentication) or (authentication == "") then
-		log("debug", "Username or password violates either SASLprep.");
+		log("debug", "Username or password violates SASLprep.");
+		return "failure", "malformed-request";
 	end
 
 	local correct, state = false, false;