aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-05-06 15:19:20 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-05-06 15:19:20 +0500
commit6c0bf0ebbeedf0d1a186b6bd178731d00671200f (patch)
tree7e851d1e21008dd8820ff0646e4b9133315d1296 /util/sasl
parentd0c208f5f118d1ba37677369d8ba6477064671bc (diff)
downloadprosody-6c0bf0ebbeedf0d1a186b6bd178731d00671200f.tar.gz
prosody-6c0bf0ebbeedf0d1a186b6bd178731d00671200f.zip
util.sasl.scram: Fixed global access.
Diffstat (limited to 'util/sasl')
-rw-r--r--util/sasl/scram.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua
index 4875731f..ed7d7bc3 100644
--- a/util/sasl/scram.lua
+++ b/util/sasl/scram.lua
@@ -117,7 +117,7 @@ local function scram_gen(hash_name, H_f, HMAC_f)
-- retreive credentials
if self.profile.plain then
- password, state = self.profile.plain(self.state.name, self.realm)
+ local password, state = self.profile.plain(self.state.name, self.realm)
if state == nil then return "failure", "not-authorized"
elseif state == false then return "failure", "account-disabled" end
@@ -130,7 +130,7 @@ local function scram_gen(hash_name, H_f, HMAC_f)
self.state.iteration_count = default_i;
self.state.salted_password = Hi(HMAC_f, password, self.state.salt, default_i);
elseif self.profile["scram_"..hash_name] then
- salted_password, iteration_count, salt, state = self.profile["scram-"..hash_name](self.state.name, self.realm);
+ local salted_password, iteration_count, salt, state = self.profile["scram-"..hash_name](self.state.name, self.realm);
if state == nil then return "failure", "not-authorized"
elseif state == false then return "failure", "account-disabled" end