Software /
code /
prosody
Diff
util/sasl/digest-md5.lua @ 3981:2b0b8fe68df2
util.sasl.*, mod_auth_*, mod_saslauth: Pass SASL handler as first parameter to SASL profile callbacks.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Mon, 27 Dec 2010 19:57:04 +0500 |
parent | 3124:21e60658767d |
child | 4113:65482a852c4d |
line wrap: on
line diff
--- a/util/sasl/digest-md5.lua Mon Dec 27 19:43:57 2010 +0500 +++ b/util/sasl/digest-md5.lua Mon Dec 27 19:57:04 2010 +0500 @@ -181,12 +181,12 @@ self.username = response["username"]; local Y, state; if self.profile.plain then - local password, state = self.profile.plain(response["username"], self.realm) + local password, state = self.profile.plain(self, response["username"], self.realm) if state == nil then return "failure", "not-authorized" elseif state == false then return "failure", "account-disabled" end Y = md5(response["username"]..":"..response["realm"]..":"..password); elseif self.profile["digest-md5"] then - Y, state = self.profile["digest-md5"](response["username"], self.realm, response["realm"], response["charset"]) + Y, state = self.profile["digest-md5"](self, 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