aboutsummaryrefslogtreecommitdiffstats
path: root/util/sasl
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2009-11-28 18:58:58 +0100
committerTobias Markmann <tm@ayena.de>2009-11-28 18:58:58 +0100
commit513d6dfa4aaf3a68d89c4ecb150c3a89f25f8539 (patch)
tree982447f60609cbaee4de484b6ebb2e9804fe23a9 /util/sasl
parentcfc34ec992be3feceed3497acb7b4b80ba7f259b (diff)
downloadprosody-513d6dfa4aaf3a68d89c4ecb150c3a89f25f8539.tar.gz
prosody-513d6dfa4aaf3a68d89c4ecb150c3a89f25f8539.zip
util.sasl.digest-md5: Fixing some variable access.
Diffstat (limited to 'util/sasl')
-rw-r--r--util/sasl/digest-md5.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/sasl/digest-md5.lua b/util/sasl/digest-md5.lua
index a14e875b..c4507d11 100644
--- a/util/sasl/digest-md5.lua
+++ b/util/sasl/digest-md5.lua
@@ -166,13 +166,14 @@ local function digest(self, message)
--TODO maybe realm support
self.username = response["username"];
+ local Y, state;
if self.profile.plain then
local password, state = self.profile.plain(response["username"], self.realm)
if state == nil then return "failure", "not-authorized"
elseif state == false then return "failure", "account-disabled" end
- local Y = md5(response["username"]..":"..response["realm"]..":"..password);
+ Y = md5(response["username"]..":"..response["realm"]..":"..password);
elseif self.profile["digest-md5"] then
- local Y, state = self.profile["digest-md5"](response["username"], self.realm, response["realm"], response["charset"])
+ Y, state = self.profile["digest-md5"](response["username"], self.realm, response["realm"], response["charset"])
if state == nil then return "failure", "not-authorized"
elseif state == false then return "failure", "account-disabled" end
elseif self.profile["digest-md5-test"] then