Mercurial > prosody-hg
comparison util/sasl.lua @ 2078:a5f154548154
util.sasl: Return proper error when client provides authzid.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Fri, 13 Nov 2009 04:24:17 +0500 |
| parents | fb3137652ea6 |
| children | 5334723fa24d |
comparison
equal
deleted
inserted
replaced
| 2077:e33658f6052c | 2078:a5f154548154 |
|---|---|
| 206 if response.authzid == self.username.."@"..self.realm then | 206 if response.authzid == self.username.."@"..self.realm then |
| 207 -- COMPAT | 207 -- COMPAT |
| 208 log("warn", "Client is violating XMPP RFC. See section 6.1 of RFC 3920."); | 208 log("warn", "Client is violating XMPP RFC. See section 6.1 of RFC 3920."); |
| 209 A1 = Y..":"..response["nonce"]..":"..response["cnonce"]..":"..response.authzid; | 209 A1 = Y..":"..response["nonce"]..":"..response["cnonce"]..":"..response.authzid; |
| 210 else | 210 else |
| 211 A1 = "?"; | 211 return "failure", "invalid-authzid"; |
| 212 end | 212 end |
| 213 else | 213 else |
| 214 A1 = Y..":"..response["nonce"]..":"..response["cnonce"]; | 214 A1 = Y..":"..response["nonce"]..":"..response["cnonce"]; |
| 215 end | 215 end |
| 216 local A2 = "AUTHENTICATE:"..protocol.."/"..domain; | 216 local A2 = "AUTHENTICATE:"..protocol.."/"..domain; |
