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 | 00d4f386b98b1f68e6061e5c647c99f26f9c33a0 (patch) | |
tree | 5a3192f70c2434f35ff5f8b8d1646f5c0ecc4143 /util/sasl/scram.lua | |
parent | 355b05e341309929a838f739f348ee6ecbe34581 (diff) | |
download | prosody-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/scram.lua')
-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) |