From d7dbbc087154aa0dbf338dc7aea0f0ddd38c9e8a Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 8 Apr 2013 15:32:24 +0100 Subject: mod_pubsub: Send bad-request when no action specified (thanks Maranda) --- plugins/mod_pubsub.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3