diff options
author | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-11-14 20:51:05 +0100 |
---|---|---|
committer | Christian Schneppe <christian.schneppe@pix-art.de> | 2019-11-15 17:14:09 +0100 |
commit | cccc24c8e2dab0ad102e7f53711657d15a585c7b (patch) | |
tree | 8f000ab3239e2e5dbd6e217ab5e502c0af6a140f /src/main | |
parent | f5d5be2b3c93d16fa6e86ba70215df819d48a3e7 (diff) |
check if sender is in contact list before accepting jingle file
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java index 5ea81b10f..7925c9b60 100644 --- a/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/jingle/JingleConnection.java @@ -525,10 +525,11 @@ public class JingleConnection implements Transferable { //expect the cipher text size. so we just + 16 bytes (auth tag size) here this.file.setExpectedSize(size + (remoteIsUsingJet ? 16 : 0)); 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 { |