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

Commit 223a65f3 authored by Rubin Xu's avatar Rubin Xu Committed by Android (Google) Code Review
Browse files

Merge "Fail gracefully if password reset token is invalidated" into oc-mr1-dev

parents 286c7db3 24570e49
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