Software /
code /
prosody
Comparison
util/sasl.lua @ 1656:cf9220a364cd
Fixing a SASL issue by always passing the realm from SASL framework init to the handlers.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sat, 08 Aug 2009 21:13:18 +0200 |
parent | 1585:edc066730d11 |
child | 1657:1fe566011e2b |
comparison
equal
deleted
inserted
replaced
1642:8ba5752851dc | 1656:cf9220a364cd |
---|---|
196 return "failure", "malformed-request", "Missing entry for digest-uri in SASL message." | 196 return "failure", "malformed-request", "Missing entry for digest-uri in SASL message." |
197 end | 197 end |
198 | 198 |
199 --TODO maybe realm support | 199 --TODO maybe realm support |
200 self.username = response["username"]; | 200 self.username = response["username"]; |
201 local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], to_unicode(domain), response["realm"], decoder); | 201 local password_encoding, Y = self.credentials_handler("DIGEST-MD5", response["username"], self.realm, response["realm"], decoder); |
202 if Y == nil then return "failure", "not-authorized" | 202 if Y == nil then return "failure", "not-authorized" |
203 elseif Y == false then return "failure", "account-disabled" end | 203 elseif Y == false then return "failure", "account-disabled" end |
204 local A1 = ""; | 204 local A1 = ""; |
205 if response.authzid then | 205 if response.authzid then |
206 if response.authzid == self.username.."@"..self.realm then | 206 if response.authzid == self.username.."@"..self.realm then |