Software /
code /
prosody
Comparison
util/sasl/scram.lua @ 2266:6e662e4f7ab2
util.sasl.scram: Fixed a variable redeclaration.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 01 Dec 2009 01:41:31 +0500 |
parent | 2265:7fe644057dc2 |
child | 2267:0a675bb365a9 |
comparison
equal
deleted
inserted
replaced
2265:7fe644057dc2 | 2266:6e662e4f7ab2 |
---|---|
114 self.state["channelbinding"] = client_final_message:match("c=(.+),r="); | 114 self.state["channelbinding"] = client_final_message:match("c=(.+),r="); |
115 if not self.state.proof or not self.state.nonce or not self.state.channelbinding then | 115 if not self.state.proof or not self.state.nonce or not self.state.channelbinding then |
116 return "failure", "malformed-request", "Missing an attribute(p, r or c) in SASL message."; | 116 return "failure", "malformed-request", "Missing an attribute(p, r or c) in SASL message."; |
117 end | 117 end |
118 | 118 |
119 local password; | 119 local password, state; |
120 if self.profile.plain then | 120 if self.profile.plain then |
121 local password, state = self.profile.plain(self.state.name, self.realm) | 121 password, state = self.profile.plain(self.state.name, self.realm) |
122 if state == nil then return "failure", "not-authorized" | 122 if state == nil then return "failure", "not-authorized" |
123 elseif state == false then return "failure", "account-disabled" end | 123 elseif state == false then return "failure", "account-disabled" end |
124 password = saslprep(password); | 124 password = saslprep(password); |
125 if not password then | 125 if not password then |
126 log("debug", "Password violates SASLprep."); | 126 log("debug", "Password violates SASLprep."); |