aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2011-08-31 23:24:13 +0500
committerWaqas Hussain <waqas20@gmail.com>2011-08-31 23:24:13 +0500
commit00d4f386b98b1f68e6061e5c647c99f26f9c33a0 (patch)
tree5a3192f70c2434f35ff5f8b8d1646f5c0ecc4143 /util/sasl
parent355b05e341309929a838f739f348ee6ecbe34581 (diff)
downloadprosody-00d4f386b98b1f68e6061e5c647c99f26f9c33a0.tar.gz
prosody-00d4f386b98b1f68e6061e5c647c99f26f9c33a0.zip
util.sasl.scram: Return proper error and don't touch datastores on empty username.
Diffstat (limited to 'util/sasl')
-rw-r--r--util/sasl/scram.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua
index aad33ebc..055ba16a 100644
--- a/util/sasl/scram.lua
+++ b/util/sasl/scram.lua
@@ -90,7 +90,7 @@ local function validate_username(username)
-- apply SASLprep
username = saslprep(username);
- return username;
+ return username and #username>0 and username;
end
local function hashprep(hashname)