aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-04-08 15:32:24 +0100
committerMatthew Wild <mwild1@gmail.com>2013-04-08 15:32:24 +0100
commitb132f180a986056588208f0604f293bef2c41b2a (patch)
treefc78ef5c157ed829188a235259e105fc4d72c748
parent746de7c5337281b98f05a287f7f3bd2024eb8e46 (diff)
downloadprosody-b132f180a986056588208f0604f293bef2c41b2a.tar.gz
prosody-b132f180a986056588208f0604f293bef2c41b2a.zip
mod_pubsub: Send bad-request when no action specified (thanks Maranda)
-rw-r--r--plugins/mod_pubsub.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_pubsub.lua b/plugins/mod_pubsub.lua
index 8f078f54..7bd33102 100644
--- a/plugins/mod_pubsub.lua
+++ b/plugins/mod_pubsub.lua
@@ -22,7 +22,9 @@ function handle_pubsub_iq(event)
local origin, stanza = event.origin, event.stanza;
local pubsub = stanza.tags[1];
local action = pubsub.tags[1];
- if not action then return; end
+ if not action then
+ return origin.send(st.error_reply(stanza, "cancel", "bad-request"));
+ end
local handler = handlers[stanza.attr.type.."_"..action.name];
if handler then
handler(origin, stanza, action);