mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Guard against shared content not having proper permissions.
Fixes #11269
This commit is contained in:
@@ -89,7 +89,12 @@ class ShareRepository {
|
||||
if (PartAuthority.isLocalUri(uri)) {
|
||||
return ShareData.forIntentData(uri, mimeType, false, false);
|
||||
} else {
|
||||
InputStream stream = context.getContentResolver().openInputStream(uri);
|
||||
InputStream stream = null;
|
||||
try {
|
||||
stream = context.getContentResolver().openInputStream(uri);
|
||||
} catch (SecurityException e) {
|
||||
Log.w(TAG, "Failed to read stream!", e);
|
||||
}
|
||||
|
||||
if (stream == null) {
|
||||
throw new IOException("Failed to open stream!");
|
||||
|
||||
Reference in New Issue
Block a user