Mercurial > prosody-hg
comparison core/modulemanager.lua @ 2949:ef19faa7d106
stanza_router, s2smanager, modulemanager: Fix for handling of the default namespace on stanzas, causing sometimes jabber:client to be sent over s2s, and accepted
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Tue, 30 Mar 2010 19:40:16 +0100 |
| parents | b7049746bd29 |
| children | 294c359a05f5 |
comparison
equal
deleted
inserted
replaced
| 2932:d2816fb6c7ea | 2949:ef19faa7d106 |
|---|---|
| 268 if handlers then | 268 if handlers then |
| 269 log("debug", "Passing stanza to mod_%s", handler_info[handlers[1]].name); | 269 log("debug", "Passing stanza to mod_%s", handler_info[handlers[1]].name); |
| 270 (handlers[1])(origin, stanza); | 270 (handlers[1])(origin, stanza); |
| 271 return true; | 271 return true; |
| 272 else | 272 else |
| 273 if stanza.attr.xmlns == "jabber:client" then | 273 if stanza.attr.xmlns == nil then |
| 274 log("debug", "Unhandled %s stanza: %s; xmlns=%s", origin.type, stanza.name, xmlns); -- we didn't handle it | 274 log("debug", "Unhandled %s stanza: %s; xmlns=%s", origin.type, stanza.name, xmlns); -- we didn't handle it |
| 275 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then | 275 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then |
| 276 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); | 276 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); |
| 277 end | 277 end |
| 278 elseif not((name == "features" or name == "error") and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features | 278 elseif not((name == "features" or name == "error") and xmlns == "http://etherx.jabber.org/streams") then -- FIXME remove check once we handle S2S features |
