aboutsummaryrefslogtreecommitdiffstats
path: root/util
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
commitbd468f86f4341521cf49b058df82b27d5475a4d5 (patch)
tree5a3192f70c2434f35ff5f8b8d1646f5c0ecc4143 /util
parenta9d4688ebcf1918446d26b32ff2b6613d7ec8200 (diff)
downloadprosody-bd468f86f4341521cf49b058df82b27d5475a4d5.tar.gz
prosody-bd468f86f4341521cf49b058df82b27d5475a4d5.zip
util.sasl.scram: Return proper error and don't touch datastores on empty username.
Diffstat (limited to 'util')
-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)