Software /
code /
prosody
Comparison
plugins/mod_pep.lua @ 2043:c0784614b66f
PEP: Stricter checks on payload validity.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 22 Oct 2009 02:16:10 +0500 |
parent | 2042:34e6e06dd089 |
child | 2044:11efc4aecd55 |
comparison
equal
deleted
inserted
replaced
2042:34e6e06dd089 | 2043:c0784614b66f |
---|---|
131 if payload.name == 'pubsub' then -- <pubsub xmlns='http://jabber.org/protocol/pubsub'> | 131 if payload.name == 'pubsub' then -- <pubsub xmlns='http://jabber.org/protocol/pubsub'> |
132 payload = payload.tags[1]; | 132 payload = payload.tags[1]; |
133 if payload and (payload.name == 'publish' or payload.name == 'retract') and payload.attr.node then -- <publish node='http://jabber.org/protocol/tune'> | 133 if payload and (payload.name == 'publish' or payload.name == 'retract') and payload.attr.node then -- <publish node='http://jabber.org/protocol/tune'> |
134 local node = payload.attr.node; | 134 local node = payload.attr.node; |
135 payload = payload.tags[1]; | 135 payload = payload.tags[1]; |
136 if payload then -- <item> | 136 if payload and payload.name == "item" then -- <item> |
137 publish(session, node, st.clone(payload)); | 137 publish(session, node, st.clone(payload)); |
138 session.send(st.reply(stanza)); | 138 session.send(st.reply(stanza)); |
139 return true; | 139 return true; |
140 end | 140 end |
141 end | 141 end |