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

Commit 656c519d 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

Change-Id: I3bba8e337fe57999daf1e7d8ff90a9f7bfc6831d
parents 7dbf5b03 223a65f3
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