Software / code / prosody
Comparison
plugins/mod_dialback.lua @ 1337:16c5aa4696ca
mod_dialback: Change FIXME comment to COMPAT
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 12 Jun 2009 11:36:32 +0100 |
| parent | 1077:d6a885cacd8c |
| child | 1523:841d61be198f |
comparison
equal
deleted
inserted
replaced
| 1336:389b4fb48901 | 1337:16c5aa4696ca |
|---|---|
| 24 module:add_handler({"s2sin_unauthed", "s2sin"}, "verify", xmlns_dialback, | 24 module:add_handler({"s2sin_unauthed", "s2sin"}, "verify", xmlns_dialback, |
| 25 function (origin, stanza) | 25 function (origin, stanza) |
| 26 -- We are being asked to verify the key, to ensure it was generated by us | 26 -- We are being asked to verify the key, to ensure it was generated by us |
| 27 origin.log("debug", "verifying that dialback key is ours..."); | 27 origin.log("debug", "verifying that dialback key is ours..."); |
| 28 local attr = stanza.attr; | 28 local attr = stanza.attr; |
| 29 -- FIXME: Grr, ejabberd breaks this one too?? it is black and white in XEP-220 example 34 | 29 -- COMPAT: Grr, ejabberd breaks this one too?? it is black and white in XEP-220 example 34 |
| 30 --if attr.from ~= origin.to_host then error("invalid-from"); end | 30 --if attr.from ~= origin.to_host then error("invalid-from"); end |
| 31 local type; | 31 local type; |
| 32 if s2s_verify_dialback(attr.id, attr.from, attr.to, stanza[1]) then | 32 if s2s_verify_dialback(attr.id, attr.from, attr.to, stanza[1]) then |
| 33 type = "valid" | 33 type = "valid" |
| 34 else | 34 else |