diff options
author | Tobias Markmann <tm@ayena.de> | 2010-05-22 20:51:01 +0200 |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2010-05-22 20:51:01 +0200 |
commit | 7847a8a20fc9fc0b057bf7f99fd0d0a80b4d85e3 (patch) | |
tree | 12467b294053090c86178d638c58e991d291f261 | |
parent | 44b60251257f7ca176c3436dad3220137a1eb5b7 (diff) | |
download | prosody-7847a8a20fc9fc0b057bf7f99fd0d0a80b4d85e3.tar.gz prosody-7847a8a20fc9fc0b057bf7f99fd0d0a80b4d85e3.zip |
util.sasl.scram: Fixing issue #177.
-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 39daf397..47e8e7b3 100644 --- a/util/sasl/scram.lua +++ b/util/sasl/scram.lua @@ -108,6 +108,7 @@ local function scram_gen(hash_name, H_f, HMAC_f) local function scram_hash(self, message) if not self.state then self["state"] = {} end + if type(message) ~= "string" or #message == 0 then return "failure", "malformed-request" end if not self.state.name then -- we are processing client_first_message local client_first_message = message; @@ -169,7 +170,6 @@ local function scram_gen(hash_name, H_f, HMAC_f) self.state["server_first_message"] = server_first_message; return "challenge", server_first_message else - if type(message) ~= "string" then return "failure", "malformed-request" end -- we are processing client_final_message local client_final_message = message; |