Validate URI intent scheme in WizardAction
Change-Id: If6b2553737e08e906145aef9f4a310e075161849
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
package org.lineageos.setupwizard.wizardmanager;
|
package org.lineageos.setupwizard.wizardmanager;
|
||||||
|
|
||||||
import static android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION;
|
import static android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION;
|
||||||
|
import static android.content.Intent.URI_INTENT_SCHEME;
|
||||||
|
|
||||||
import static org.lineageos.setupwizard.SetupWizardApp.LOGV;
|
import static org.lineageos.setupwizard.SetupWizardApp.LOGV;
|
||||||
|
|
||||||
@@ -62,7 +63,8 @@ public class WizardAction implements Parcelable {
|
|||||||
public Intent getIntent() {
|
public Intent getIntent() {
|
||||||
Intent intent = null;
|
Intent intent = null;
|
||||||
try {
|
try {
|
||||||
intent = Intent.parseUri(mUri, FLAG_GRANT_READ_URI_PERMISSION);
|
intent = Intent.parseUri(mUri, URI_INTENT_SCHEME);
|
||||||
|
intent.addFlags(FLAG_GRANT_READ_URI_PERMISSION);
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException e) {
|
||||||
Log.e(TAG, "Bad URI: " + mUri);
|
Log.e(TAG, "Bad URI: " + mUri);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user