Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d268a221 authored by Christopher Tate's avatar Christopher Tate
Browse files

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
parent 2208e743
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -106,6 +106,10 @@ public final class IntentFilterVerificationReceiver extends BroadcastReceiver {
                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,