[PR #8006] [MERGED] fix(rate-limit): harden default rules and fix phone-number window #24582

Closed
opened 2026-04-15 22:26:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8006
Author: @Paola3stefania
Created: 2/16/2026
Status: Merged
Merged: 2/16/2026
Merged by: @Bekacru

Base: canaryHead: fix/rate-limit-email-flooding-and-ip-warning


📝 Commits (2)

  • d3a7c6f rate limit fix and phoen number window
  • a10c253 Merge branch 'canary' into fix/rate-limit-email-flooding-and-ip-warning

📊 Changes

2 files changed (+23 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/api/rate-limiter/index.ts (+22 -0)
📝 packages/better-auth/src/plugins/phone-number/index.ts (+1 -1)

📄 Description

Summary by cubic

Strengthened rate-limit rules for email verification and password reset endpoints to reduce email flooding. Fixed the phone-number plugin to use seconds for its window and added a one-time IP-missing warning to avoid log spam and guide proxy setup.

  • New Features

    • Special rules (window: 60s, max: 3) for: /request-password-reset, /send-verification-email, /forget-password..., /email-otp/send-verification-otp, /email-otp/request-password-reset.
  • Bug Fixes

    • Phone-number plugin: window corrected to 60 seconds (was 60*1000).
    • Log a single warning when client IP is unavailable, with guidance to configure trustedProxies.

Written for commit a10c25303e. Summary will update on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8006 **Author:** [@Paola3stefania](https://github.com/Paola3stefania) **Created:** 2/16/2026 **Status:** ✅ Merged **Merged:** 2/16/2026 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/rate-limit-email-flooding-and-ip-warning` --- ### 📝 Commits (2) - [`d3a7c6f`](https://github.com/better-auth/better-auth/commit/d3a7c6fd82390ea37140908fd9942a6ecffaf5e7) rate limit fix and phoen number window - [`a10c253`](https://github.com/better-auth/better-auth/commit/a10c25303e6c8dbbe083ccf5ad8d993402c81647) Merge branch 'canary' into fix/rate-limit-email-flooding-and-ip-warning ### 📊 Changes **2 files changed** (+23 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/rate-limiter/index.ts` (+22 -0) 📝 `packages/better-auth/src/plugins/phone-number/index.ts` (+1 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Strengthened rate-limit rules for email verification and password reset endpoints to reduce email flooding. Fixed the phone-number plugin to use seconds for its window and added a one-time IP-missing warning to avoid log spam and guide proxy setup. - **New Features** - Special rules (window: 60s, max: 3) for: /request-password-reset, /send-verification-email, /forget-password..., /email-otp/send-verification-otp, /email-otp/request-password-reset. - **Bug Fixes** - Phone-number plugin: window corrected to 60 seconds (was 60*1000). - Log a single warning when client IP is unavailable, with guidance to configure trustedProxies. <sup>Written for commit a10c25303e6c8dbbe083ccf5ad8d993402c81647. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:26:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#24582