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

Commit b2eb68da authored by Rubin Xu's avatar Rubin Xu Committed by android-build-merger
Browse files

Merge "Fail gracefully if password reset token is invalidated" into oc-mr1-dev am: 223a65f3

am: 656c519d

Change-Id: I8c55be53d2a3bc53e5f003db61a5d78dd49c053c
parents 139c7b17 656c519d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2366,6 +2366,13 @@ public class LockSettingsService extends ILockSettings.Stub {
                Slog.w(TAG, "Invalid escrow token supplied");
                return false;
            }
            if (result.gkResponse.getResponseCode() != VerifyCredentialResponse.RESPONSE_OK) {
                // Most likely, an untrusted credential reset happened in the past which
                // changed the synthetic password
                Slog.e(TAG, "Obsolete token: synthetic password derived but it fails GK "
                        + "verification.");
                return false;
            }
            // Update PASSWORD_TYPE_KEY since it's needed by notifyActivePasswordMetricsAvailable()
            // called by setLockCredentialWithAuthTokenLocked().
            // TODO: refactor usage of PASSWORD_TYPE_KEY b/65239740