Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rate limiter for registration route #593

Closed

Conversation

TobMoeller
Copy link

This PR adds an (optional) rate limiter to the registration route to help mitigate abuse. Without throttling, bots or malicious users could potentially create millions of accounts in a short period or perform a denial-of-service attack by overwhelming the endpoint.

Testing Considerations

I haven't included automated tests for this functionality yet. If someone can offer guidance or assistance on the best approach to test this rate limiter, that would be greatly appreciated.

Documentation

The UPGRADE.md file currently includes changes to the two-factor rate limiting. I was uncertain, if this addition should be included aswell.

Rate Limiting Logic

The current logic (5 registrations per minute per IP) is debatable. I welcome discussion on whether this limit should be adjusted, made configurable, or if alternative approaches should be considered.

@taylorotwell
Copy link
Member

This will block legitimate registrations due to IP addresses often being shared.

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.

2 participants