check if sender is in contact list before accepting jingle file
This commit is contained in:
parent
f5d5be2b3c
commit
cccc24c8e2
1 changed files with 3 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Reference in a new issue