Mercurial > prosody-hg
diff plugins/mod_pubsub.lua @ 5443:92615cfa2270
mod_pubsub: Don't attempt to handle iq stanzas with no action element
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 08 Apr 2013 15:04:55 +0100 |
| parents | e28fca8faf62 |
| children | 9054b51e71a4 |
line wrap: on
line diff
--- a/plugins/mod_pubsub.lua Sun Apr 07 20:28:12 2013 +0100 +++ b/plugins/mod_pubsub.lua Mon Apr 08 15:04:55 2013 +0100 @@ -22,6 +22,7 @@ local origin, stanza = event.origin, event.stanza; local pubsub = stanza.tags[1]; local action = pubsub.tags[1]; + if not action then return; end local handler = handlers[stanza.attr.type.."_"..action.name]; if handler then handler(origin, stanza, action);
