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
This commit is contained in:
Sam Lee 2016-03-23 16:42:43 -07:00 committed by The Android Automerger
parent c84ce2000f
commit 2791f0b33b

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;
}
}