mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Prohibit sharing file:// Uris
Just in case someone tries something sneaky... // FREEBIE
This commit is contained in:
parent
4168092f5d
commit
3b8ec792ee
@ -193,11 +193,12 @@ public class ShareActivity extends PassphraseRequiredActionBarActivity
|
||||
@Override
|
||||
protected Uri doInBackground(Uri... uris) {
|
||||
try {
|
||||
if (uris.length != 1 || uris[0] == null) {
|
||||
if (uris.length != 1 || uris[0] == null || uris[0].getScheme().equals("file")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
InputStream input = context.getContentResolver().openInputStream(uris[0]);
|
||||
|
||||
if (input == null) {
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user