Messaging doesn't allow sharing of its own files
-Previously, Messaging allowed sharing of any file it had permission
to reach. This meant that bad apps could share a link to
file:///data/data/com.android.messaging/databases/bugle_db
and Messaging would happily send all this sensitive information to
the target. Worse, a bad app could share a softlink to this file,
where the symlink was picture.jpg with the image/jpg type.
-Now, when sanitizing attachments, we make sure any filepaths don't
lead to any Bugle-specific directories.
-getApplicationInfo().dataDir is a symlink to
/data/data/com.android.messaging, and appears to be the
only directory where we store personal data.
-Most apps share as contentUris, including Messaging, so Messaging
can still share to itself.
Change-Id: Ic464bc1f099029a030793c478aaf88b957d8bad1
Fixes:28076752
2 files changed