Commit 2f2a68dc authored by Armando Jagucki's avatar Armando Jagucki Committed by ajagucki

PEP: Disallow publishing of User Avatar until XEP-0084 is implemented.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches@8914 b35dd754-fafc-0310-a699-88a17e54d16e
parent 348af2f5
......@@ -254,6 +254,15 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
if (publishElement != null) {
String nodeID = publishElement.attributeValue("node");
// Do not allow User Avatar nodes to be created.
// TODO: Implement XEP-0084
if (nodeID.startsWith("http://www.xmpp.org/extensions/xep-0084.html")) {
IQ reply = IQ.createResultIQ(packet);
reply.setChildElement(packet.getChildElement().createCopy());
reply.setError(PacketError.Condition.feature_not_implemented);
return reply;
}
if (pepService.getNode(nodeID) == null) {
// Create the node
JID creator = new JID(jidFrom);
......@@ -606,7 +615,7 @@ public class IQPEPHandler extends IQHandler implements ServerIdentitiesProvider,
JID jidFrom = packet.getFrom();
JID jidTo = packet.getTo();
if (!XMPPServer.getInstance().isLocal(jidFrom) && jidTo != null) {
if (!XMPPServer.getInstance().isLocal(jidFrom) && jidFrom != null && jidTo != null) {
if (Log.isDebugEnabled()) {
Log.debug("PEP: received presence from: " + jidFrom + " to: " + jidTo);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment