Browse Source

Don't allow cachedFile Attachments if the content Uri is pointing to EmailProvider.

This is to backport a security fix reported by b/27308057 and b/27335139.
Also, add Analytics for these errors.

Bug: b/27335139
Change-Id: Iaacb34e4983cdf9a85487222ae930cb64d80a193
replicant-6.0
Sam Lee 4 years ago
committed by The Android Automerger
parent
commit
2791f0b33b
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/com/android/email/activity/ComposeActivityEmail.java

+ 6
- 0
src/com/android/email/activity/ComposeActivityEmail.java View File

@@ -23,6 +23,7 @@ import android.view.MenuItem;
import android.widget.EditText;

import com.android.email.R;
import com.android.emailcommon.provider.EmailContent;
import com.android.mail.compose.ComposeActivity;
import com.android.mail.utils.LogUtils;

@@ -68,4 +69,9 @@ public class ComposeActivityEmail extends ComposeActivity
mBodyView.setSelection(mBodyView.getText().length());
}
}

@Override
protected String getEmailProviderAuthority() {
return EmailContent.AUTHORITY;
}
}

Loading…
Cancel
Save