From 24b1c23c62b3d8ca1d762a76b2f1ef6360fc683e Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 20 Nov 2014 17:17:39 -0800 Subject: Fix issue #15828903: Intent.parseUri allows call to FLAG_GRANT_*_URI_PERMISSION You now need to set a flag if you want this unsafe behavior. Change-Id: I185e9a04e005e42a887c3d58a2818616790b060a --- cmds/am/src/com/android/commands/am/Am.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cmds') diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index 0cad17d..475d540 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -55,12 +55,9 @@ import android.text.TextUtils; import android.util.AndroidException; import android.util.ArrayMap; import android.view.IWindowManager; -import android.view.View; import com.android.internal.os.BaseCommand; -import dalvik.system.VMRuntime; - import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; @@ -619,7 +616,7 @@ public class Am extends BaseCommand { // The argument is a URI. Fully parse it, and use that result // to fill in any data not specified so far. baseIntent = Intent.parseUri(arg, Intent.URI_INTENT_SCHEME - | Intent.URI_ANDROID_APP_SCHEME); + | Intent.URI_ANDROID_APP_SCHEME | Intent.URI_ALLOW_UNSAFE); } else if (arg.indexOf('/') >= 0) { // The argument is a component name. Build an Intent to launch // it. -- cgit v1.1