Skip to content
Permalink
Browse files

Checks from for received carbon messages, should be bare jid.

  • Loading branch information...
damencho committed Jan 26, 2017
1 parent cf6951b commit 7d66da61b316c9480b63000f831b6de723b87315
@@ -815,6 +815,17 @@ public void processPacket(Packet packet)
ForwardedPacketExtension.class);
if(extensions.isEmpty())
return;

// according to xep-0280 all carbons should come from
// our bare jid
if (!msg.getFrom().equals(
StringUtils.parseBareAddress(
jabberProvider.getOurJID())))
{
logger.info("Received a carbon copy with wrong from!");
return;
}

ForwardedPacketExtension forwardedExt = extensions.get(0);
msg = forwardedExt.getMessage();
if(msg == null || msg.getBody() == null)

0 comments on commit 7d66da6

Please sign in to comment.
You can’t perform that action at this time.