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

Commit 98145fa0 authored by Dan Cashman's avatar Dan Cashman Committed by android-build-merger
Browse files

Merge "InstantAppRegistry: adjust backwards compat cookie sig check." into pi-dev

am: 4a17a574

Change-Id: I8e45fcfec81859be5a7e19dba4a82e505827b958
parents a9d84bcf 4a17a574
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -312,13 +312,15 @@ class InstantAppRegistry {
                return;
            }

            // For backwards compatibility we accept match based on first signature only in the case
            // of multiply-signed packagse
            // For backwards compatibility we accept match based on any signature, since we may have
            // recorded only the first for multiply-signed packages
            final String[] signaturesSha256Digests =
                    PackageUtils.computeSignaturesSha256Digests(pkg.mSigningDetails.signatures);
            if (signaturesSha256Digests[0].equals(currentCookieSha256)) {
            for (String s : signaturesSha256Digests) {
                if (s.equals(currentCookieSha256)) {
                    return;
                }
            }

            // Sorry, you are out of luck - different signatures - nuke data
            Slog.i(LOG_TAG, "Signature for package " + pkg.packageName