Commit 07a11864 authored by Makoto Kato's avatar Makoto Kato Committed by Pier Angelo Vendrame
Browse files

Bug 1974025 - Check scheme into Intent data. r=geckoview-reviewers,tcampbell,nalexander a=RyanVM

parent 7636707c
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ public class IntentUtils {
    }

    if (("intent".equals(scheme) || "android-app".equals(scheme))) {
      // Bug 1356893 - Rject intents with file data schemes.
      // Bug 1356893 - Reject intents with file data schemes.
      return getSafeIntent(aUri) != null;
    }

@@ -115,9 +115,12 @@ public class IntentUtils {
    }

    final Uri data = intent.getData();
    if (data != null && "file".equals(normalizeUriScheme(data).getScheme())) {
    if (data != null) {
      final String scheme = normalizeUriScheme(data).getScheme();
      if ("file".equals(scheme) || "fido".equals(scheme)) {
        return null;
      }
    }

    // Only open applications which can accept arbitrary data from a browser.
    intent.addCategory(Intent.CATEGORY_BROWSABLE);