plugins/mod_pubsub/pubsub.lib.lua
changeset 8937 365bcf899093
parent 8936 6d3ecf9e8277
child 8938 a825ef6de45a
--- a/plugins/mod_pubsub/pubsub.lib.lua	Tue Jun 26 19:30:28 2018 +0200
+++ b/plugins/mod_pubsub/pubsub.lib.lua	Tue Jun 26 19:34:35 2018 +0200
@@ -465,6 +465,12 @@
 		return true;
 	end
 
+	local node_obj = service.nodes[node];
+	if not node_obj then
+		origin.send(pubsub_error_reply(stanza, "item-not-found"));
+		return true;
+	end
+
 	local reply = st.reply(stanza)
 		:tag("pubsub", { xmlns = xmlns_pubsub_owner })
 			:tag("affiliations", { node = node });