check if sender is in contact list before accepting jingle file

This commit is contained in:
Daniel Gultsch 2019-11-09 22:58:02 +01:00
parent 8d6fdfbde7
commit 79e174743e

View file

@ -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 {