diff options
author | damencho <damencho@jitsi.org> | 2017-01-26 17:00:46 -0600 |
---|---|---|
committer | damencho <damencho@jitsi.org> | 2017-01-26 17:00:46 -0600 |
commit | 7d66da61b316c9480b63000f831b6de723b87315 (patch) | |
tree | 0c4e5d693d644df5a5ef89158c4ab4e60d6ba5aa | |
parent | cf6951b80e0ef9fe04fcd91f946c464145de683f (diff) | |
download | jitsi-7d66da61b316c9480b63000f831b6de723b87315.zip jitsi-7d66da61b316c9480b63000f831b6de723b87315.tar.gz jitsi-7d66da61b316c9480b63000f831b6de723b87315.tar.bz2 |
Checks from for received carbon messages, should be bare jid.
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java index f055613..2f35fef 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java @@ -815,6 +815,17 @@ public class OperationSetBasicInstantMessagingJabberImpl 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) |