From 3805f9507a3931f34067fcb64ae28e6f69d44fcc Mon Sep 17 00:00:00 2001 From: paweldomas Date: Fri, 16 Dec 2016 08:58:37 -0600 Subject: Use base Connection class instead of XMPPConnection Tries to use base Connection class instead of XMPPConnection where possible. --- .../protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java') 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 42a3916..f055613 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java @@ -1109,7 +1109,7 @@ public class OperationSetBasicInstantMessagingJabberImpl NewMailNotificationIQ.NAMESPACE, new NewMailNotificationProvider()); - XMPPConnection connection = jabberProvider.getConnection(); + Connection connection = jabberProvider.getConnection(); connection.addPacketListener( new MailboxIQListener(), new PacketTypeFilter(MailboxIQ.class)); -- cgit v1.1 From 7d66da61b316c9480b63000f831b6de723b87315 Mon Sep 17 00:00:00 2001 From: damencho Date: Thu, 26 Jan 2017 17:00:46 -0600 Subject: Checks from for received carbon messages, should be bare jid. --- .../jabber/OperationSetBasicInstantMessagingJabberImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicInstantMessagingJabberImpl.java') 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) -- cgit v1.1