Diff

util/sasl/scram.lua @ 4368:916834f22d1b

util.sasl.scram: Return proper error and don't touch datastores on empty username.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 31 Aug 2011 23:24:13 +0500
parent 4204:edd7b0610c2c
child 5301:6279caf921f1
line wrap: on
line diff
--- a/util/sasl/scram.lua	Tue Aug 30 17:51:36 2011 -0400
+++ b/util/sasl/scram.lua	Wed Aug 31 23:24:13 2011 +0500
@@ -90,7 +90,7 @@
 	
 	-- apply SASLprep
 	username = saslprep(username);
-	return username;
+	return username and #username>0 and username;
 end
 
 local function hashprep(hashname)