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

Commit 36db8a1d authored by Dmitry Dementyev's avatar Dmitry Dementyev
Browse files

Add more checkKeyIntent checks to AccountManagerService.

Another verification is needed after Bundle modification.
Bug: 321941232
Test: manual

Change-Id: I9e45d758a2320328da5664b6341eafe6f285f297
parent 5b695073
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -3558,6 +3558,11 @@ public class AccountManagerService

            // Strip auth token from result.
            result.remove(AccountManager.KEY_AUTHTOKEN);
            if (!checkKeyIntent(Binder.getCallingUid(), result)) {
                onError(AccountManager.ERROR_CODE_INVALID_RESPONSE,
                        "invalid intent in bundle returned");
                return;
            }

            if (Log.isLoggable(TAG, Log.VERBOSE)) {
                Log.v(TAG,
@@ -5135,6 +5140,11 @@ public class AccountManagerService
                    } else {
                        if (mStripAuthTokenFromResult) {
                            result.remove(AccountManager.KEY_AUTHTOKEN);
                            if (!checkKeyIntent(Binder.getCallingUid(), result)) {
                                onError(AccountManager.ERROR_CODE_INVALID_RESPONSE,
                                        "invalid intent in bundle returned");
                                return;
                            }
                        }
                        if (Log.isLoggable(TAG, Log.VERBOSE)) {
                            Log.v(TAG, getClass().getSimpleName()