Skip to content

Failed reset of the authentication attempt counter can carry failed attempts over to later sessions #4789

Description

@myxmaster

Describe your enhancement idea

After a successful login, Lockscreen resets authenticationAttempts to 0 through updateSettings. If that write fails (e.g. the keychain rejects setInternetCredentials), the unlock continues (since #4423 the error is logged), but the persisted counter keeps its value.

The next failed attempt counts up from that stale value (onAttemptLogIn reads the persisted count). Failed attempts from separate sessions therefore add up, and authenticationFailure() wipes the wallet after fewer than maxAuthenticationAttempts (5) failed attempts in one session.

This predates #4423: the reset used to be fire-and-forget, with the same outcome when the write failed.

A possible direction: retry the reset later, e.g. on the next start after a successful login.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions