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

Commit 4a17a574 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents c359f490 928b7030
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