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

Commit eccbc2f4 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

am: 98145fa0

Change-Id: I8daf1427476801a7a5fa7fa62cfbf2453a398997
parents a4841d08 98145fa0
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