镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix: issue #902 — login rate limit reads ms3_customer_max_login_attempts & ms3_customer_block_duration - #1017

Open
Ibochkarev wants to merge 1 commit into
betafrom
fix/902-login-rate-limit-reads-settings
Open

Ibochkarev wants to merge 1 commit into
betafrom
fix/902-login-rate-limit-reads-settings

Conversation

@Ibochkarev

Copy link
Copy Markdown
Member

fix: issue #902 — login rate limit now respects system settings

Problem

The Login processor used hard‑coded limits (maxAttempts = 5, windowSeconds = 300). These values ignored the configurable settings ms3_customer_max_login_attempts and ms3_customer_block_duration, making it impossible for site owners to adjust the brute‑force protection thresholds.

Fix

  • Updated core/components/minishop3/src/Processors/Api/Customer/Login.php to read the two settings via $this->modx->getOption().
  • Fell back to the original defaults (5 attempts, 300 s) to keep backward compatibility if the settings are absent.

Related issue

Testing

  1. Deploy the build from branch fix/902-login-rate-limit-reads-settings to the project.test environment.
  2. In MODX manager, set ms3_customer_max_login_attempts to a custom value (e.g., 3) and ms3_customer_block_duration to 120.
  3. Perform repeated failed login attempts from the same IP.
  4. Verify the rate‑limit triggers after the configured number of attempts and respects the configured block duration.
  5. Run the full test suite (composer test). All tests pass.

Changelog

### Fixed
- Login rate‑limit now reads configurable settings (`ms3_customer_max_login_attempts`, `ms3_customer_block_duration`).

Branch: fix/902-login-rate-limit-reads-settings
Base: beta

…ttempts and ms3_customer_block_duration settings
@Ibochkarev
Ibochkarev requested a review from biz87 November 15, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] IP-лимит входа не читает настройки покупателя

1 participant