diff options
author | Waqas Hussain <waqas20@gmail.com> | 2011-08-31 23:24:13 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2011-08-31 23:24:13 +0500 |
commit | bd468f86f4341521cf49b058df82b27d5475a4d5 (patch) | |
tree | 5a3192f70c2434f35ff5f8b8d1646f5c0ecc4143 /util | |
parent | a9d4688ebcf1918446d26b32ff2b6613d7ec8200 (diff) | |
download | prosody-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.lua | 2 |
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) |