# HG changeset patch
# User Waqas Hussain <waqas20@gmail.com>
# Date 1256159770 -18000
# Node ID c0784614b66fe2e5a38b1e5bededed4610f36ada
# Parent  34e6e06dd089da55aba9fa9bd6bc83a32dc30eaf
PEP: Stricter checks on payload validity.

diff -r 34e6e06dd089 -r c0784614b66f plugins/mod_pep.lua
--- a/plugins/mod_pep.lua	Thu Oct 22 02:13:02 2009 +0500
+++ b/plugins/mod_pep.lua	Thu Oct 22 02:16:10 2009 +0500
@@ -133,7 +133,7 @@
 			if payload and (payload.name == 'publish' or payload.name == 'retract') and payload.attr.node then -- <publish node='http://jabber.org/protocol/tune'>
 				local node = payload.attr.node;
 				payload = payload.tags[1];
-				if payload then -- <item>
+				if payload and payload.name == "item" then -- <item>
 					publish(session, node, st.clone(payload));
 					session.send(st.reply(stanza));
 					return true;