Changeset

5445:9054b51e71a4

mod_pubsub: Send bad-request when no action specified (thanks Maranda)
author Matthew Wild <mwild1@gmail.com>
date Mon, 08 Apr 2013 15:32:24 +0100
parents 5443:92615cfa2270
children 5446:51686426cac2 5447:92b88476873a
files plugins/mod_pubsub.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_pubsub.lua	Mon Apr 08 15:04:55 2013 +0100
+++ b/plugins/mod_pubsub.lua	Mon Apr 08 15:32:24 2013 +0100
@@ -22,7 +22,9 @@
 	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);