Skip to content

Show the real wait time after too many login attempts #10

Open

Description

@t2d

After too many login attempts, the plugin says "Please try again later" without a time. A fixed time in the message would drift from userli's roundcube_login limiter config, and the sliding window makes the real wait shorter anyway.

Proposal

  • userli: send a Retry-After header with the 429 response of /api/roundcube/login, from RateLimit::getRetryAfter().
  • Plugin: read Retry-After in request_api(), round up to minutes, and pass $this->gettext(['name' => 'too_many_attempts', 'vars' => ['minutes' => $m]]) as $args['error']. Roundcube shows non-label text unchanged. Keep "try again later" when the header is missing (older userli).

Related: userli PR 1394, roundcube-userli-plugin PR 9.

🤖 Generated with Claude Code

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions