commit | d268a221dce09803d24a341543c9bc71fd09f3ce | [log] [tgz] |
---|---|---|
author | Christopher Tate <ctate@google.com> | Fri Feb 19 16:48:28 2016 -0800 |
committer | Christopher Tate <ctate@google.com> | Fri Feb 19 16:48:28 2016 -0800 |
tree | e465611c37700d2a023f615d912b7c641f0bfd03 | |
parent | 2208e743e4c2da29008f6503c2d678c7e28e7812 [diff] [blame] |
Implement wildcard-host policy in reference autoVerify implementation For intent filters that match "*.example.tld" hosts, we now look at https://example.tld/... to validate the claim. Change-Id: I9725058fa45e85c96ed4a07781b3f989ac6fd661
diff --git a/packages/StatementService/src/com/android/statementservice/IntentFilterVerificationReceiver.java b/packages/StatementService/src/com/android/statementservice/IntentFilterVerificationReceiver.java index 712347a..57809ac 100644 --- a/packages/StatementService/src/com/android/statementservice/IntentFilterVerificationReceiver.java +++ b/packages/StatementService/src/com/android/statementservice/IntentFilterVerificationReceiver.java
@@ -106,6 +106,10 @@ try { ArrayList<String> sourceAssets = new ArrayList<String>(); for (String host : hostList) { + // "*.example.tld" is validated via https://example.tld + if (host.startsWith("*.")) { + host = host.substring(2); + } sourceAssets.add(createWebAssetString(scheme, host)); } extras.putStringArrayList(DirectStatementService.EXTRA_SOURCE_ASSET_DESCRIPTORS,