diff options
author | Christopher Tate <ctate@google.com> | 2020-02-25 17:48:49 -0800 |
---|---|---|
committer | Chris Tate <ctate@android.com> | 2020-03-31 17:56:29 +0000 |
commit | 18e46e36eba07a83a204cb3d16aa2b2cf4c5164d (patch) | |
tree | ecf817d3d3ea3400be68b579d6ec908f3260caf6 | |
parent | 41d1927c3f9391e6ce0a06b4cda5d27b5761fab8 (diff) | |
download | frameworks_base-18e46e36eba07a83a204cb3d16aa2b2cf4c5164d.tar.gz frameworks_base-18e46e36eba07a83a204cb3d16aa2b2cf4c5164d.tar.bz2 frameworks_base-18e46e36eba07a83a204cb3d16aa2b2cf4c5164d.zip |
Verify all possible hosts that match web nav
Even if an <intent-filter> matches non-web schemes in addition to http
or https, make sure to include its cited hosts in the autoVerify
evaluation.
Bug: 150038428
Test: atest OsHostTests#testIntentFilterHostValidation
Change-Id: If9ef0fc53d96e6581c56d86f89fe63bc9a5fb89a
Merged-In: If9ef0fc53d96e6581c56d86f89fe63bc9a5fb89a
(cherry picked from commit 1fba0f897f276d5d47962534867e764da8061105)
-rw-r--r-- | services/core/java/com/android/server/pm/PackageManagerService.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java index a3f3cedf1e2..3888c3130c1 100644 --- a/services/core/java/com/android/server/pm/PackageManagerService.java +++ b/services/core/java/com/android/server/pm/PackageManagerService.java @@ -18470,7 +18470,9 @@ public class PackageManagerService extends IPackageManager.Stub final int verificationId = mIntentFilterVerificationToken++; for (PackageParser.Activity a : pkg.activities) { for (ActivityIntentInfo filter : a.intents) { - if (filter.handlesWebUris(true) && needsNetworkVerificationLPr(filter)) { + // Run verification against hosts mentioned in any web-nav intent filter, + // even if the filter matches non-web schemes as well + if (filter.handlesWebUris(false) && needsNetworkVerificationLPr(filter)) { if (DEBUG_DOMAIN_VERIFICATION) Slog.d(TAG, "Verification needed for IntentFilter:" + filter.toString()); mIntentFilterVerifier.addOneIntentFilterVerification( |