X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;ds=sidebyside;f=util%2Fsasl%2Fscram.lua;h=b3c4edc8f090ab6287b103a0a599f9ded9bcd1ad;hb=65f6c27a309f437de75aad3f8eeed1bfb27345ef;hp=a1b5117a7f2833d09d1427a5956b0c7f9f2efb9e;hpb=a39f99c875d6952171891ead7604bf93243ddbfd;p=prosody.git diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua index a1b5117a..b3c4edc8 100644 --- a/util/sasl/scram.lua +++ b/util/sasl/scram.lua @@ -150,9 +150,9 @@ local function scram_gen(hash_name, H_f, HMAC_f) -- retreive credentials local stored_key, server_key, salt, iteration_count; if self.profile.plain then - local password, state = self.profile.plain(self, username, self.realm) - if state == nil then return "failure", "not-authorized" - elseif state == false then return "failure", "account-disabled" end + local password, status = self.profile.plain(self, username, self.realm) + if status == nil then return "failure", "not-authorized" + elseif status == false then return "failure", "account-disabled" end password = saslprep(password); if not password then @@ -170,8 +170,8 @@ local function scram_gen(hash_name, H_f, HMAC_f) return "failure", "temporary-auth-failure"; end elseif self.profile[profile_name] then - local state; - stored_key, server_key, iteration_count, salt, state = self.profile[profile_name](self, username, self.realm); + local status; + stored_key, server_key, iteration_count, salt, status = self.profile[profile_name](self, username, self.realm); if state == nil then return "failure", "not-authorized" elseif state == false then return "failure", "account-disabled" end end