Skip to content

feat: cap guest auto-registration with a shared Redis token bucket - #1214

Merged
jiangsier-xyz merged 1 commit into
mainfrom
feat/guest-registration-rate-limit
Oct 31, 2026
Merged

jiangsier-xyz merged 1 commit into
mainfrom
feat/guest-registration-rate-limit

Conversation

@jiangsier-xyz

Copy link
Copy Markdown
Contributor

/public/register/guest created a permanent ROLE_USER account per click with no throttle, so the user table could grow without bound. Spend one permit from a site-wide Redisson bucket before registering, and reject with 429 once the window is exhausted. OAuth2 sign-up keeps its own unrestricted path. The permit count and window come from auth.guest.registration so a tester can lower them without a code change.

/public/register/guest created a permanent ROLE_USER account per click with
no throttle, so the user table could grow without bound. Spend one permit
from a site-wide Redisson bucket before registering, and reject with 429
once the window is exhausted. OAuth2 sign-up keeps its own unrestricted
path. The permit count and window come from auth.guest.registration so a
tester can lower them without a code change.
@jiangsier-xyz
jiangsier-xyz merged commit 91d1e5f into main Oct 31, 2026
2 checks passed
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.

1 participant