summaryrefslogtreecommitdiff
path: root/src/com/android/messaging/util/FileUtil.java
Commit message (Collapse)AuthorAgeFilesLines
* Use UriUtil when checking if a URI is a file.Jake Klinker2022-01-311-5/+1
| | | | | | | UriUtil.isFileUri contains several additional fixes, so this ensure that existing instances where we check for the file scheme use this method as well. This covers all existing instances in the app of SCHEME_FILE. Change-Id: I1f3131b33823eae3e620aa9608be8e72b2e84aa2 Bug: 215212561
* Use file extension based on MIME typeTaesu Lee2020-02-051-4/+1
| | | | | | | | | It uses the most common extension for the given MIME type. Test: Manual Change-Id: I3d4aea85fcd42088ed19898054db7225954d3401 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
* Messenger refuses all file:///data/ urisTavis Bohne2016-05-171-4/+6
| | | | | | | | | | | | | We've been informed it's possible for an app to create a world readable hardlink in L in its own /data directory that links to another apps private data, including Messenger data. The hardlink bypassed our existing checks. So now we simply refuse all file: uris in the /data/ directory. Other apps shouldn't be sending file uris anyway, and we dont know of any that send file:///data/ uris. Bug: 28793303 Change-Id: I778bb2bcb9e11185357093c59fc1fa3f6caa26a1
* Messaging doesn't allow sharing of its own filesTavis Bohne2016-04-291-0/+17
| | | | | | | | | | | | | | | | | | | -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
* Initial checkin of AOSP Messaging app.Mike Dodd2015-08-121-0/+140
| | | | | | b/23110861 Change-Id: I11db999bd10656801e618f78ab2b2ef74136fff1
* Revert "Initial checkin of AOSP Messaging app."Mike Dodd2015-08-121-140/+0
| | | | | | This reverts commit 461a34b466cb4b13dbbc2ec6330b31e217b2ac4e. Change-Id: Iac4ca77eeaa94989e91dead49a7959c905bd3078
* Initial checkin of AOSP Messaging app.Mike Dodd2015-08-121-0/+140
b/23110861 Change-Id: I9aa980d7569247d6b2ca78f5dcb4502e1eaadb8a