From 79e174743eaea334b33f571f66c9800007133e20 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 9 Nov 2019 22:58:02 +0100 Subject: [PATCH] check if sender is in contact list before accepting jingle file --- .../eu/siacs/conversations/xmpp/jingle/JingleConnection.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java index 9ede779f6..8851dc590 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleConnection.java @@ -507,10 +507,11 @@ public class JingleConnection implements Transferable { respondToIq(packet, true); - if (mJingleConnectionManager.hasStoragePermission() + if (account.getRoster().getContact(from).showInContactList() + && mJingleConnectionManager.hasStoragePermission() && size < this.mJingleConnectionManager.getAutoAcceptFileSize() && mXmppConnectionService.isDataSaverDisabled()) { - Log.d(Config.LOGTAG, "auto accepting file from " + packet.getFrom()); + Log.d(Config.LOGTAG, "auto accepting file from " + from); this.acceptedAutomatically = true; this.sendAccept(); } else {