Changeset

3016:b6046df19898

util.sasl.scram: Fixed global access.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 06 May 2010 15:19:20 +0500
parents 3015:aad8034ab389
children 3020:4164023a2258
files util/sasl/scram.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/util/sasl/scram.lua	Wed May 05 20:35:06 2010 +0100
+++ b/util/sasl/scram.lua	Thu May 06 15:19:20 2010 +0500
@@ -117,7 +117,7 @@
 			
 			-- 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 @@
 				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