A basic rate limiting extension for TYPO3 forms using the Symfony RateLimiter component.
- π― Middleware-based: Early interception for maximum efficiency
- βοΈ Backend Configuration: Fully configurable via TYPO3 Extension Settings
- π IP Management: Whitelist and blacklist support with TYPO3's native IP utilities
- π AJAX Support: Works with both traditional and AJAX form submissions
- π Logging: Optional logging for monitoring and debugging
- TYPO3 v12.4+ or v13.4+
- PHP 8.3+
- EXT:form
- Symfony RateLimiter component
Install the extension via Composer:
composer require plan2net/form-rate-limiterNavigate to Admin Tools > Settings > Extension Configuration > form_rate_limiter:
| Setting | Default | Description |
|---|---|---|
| Enable Rate Limiting | Yes | Global on/off switch |
| Rate Limiting Mode | Per Form | Apply limits per form or globally across all forms |
| Maximum Attempts | 5 | Max attempts per interval |
| Time Interval | 15 minutes | Time window |
| Whitelist IPs | - | IPs that bypass rate limiting |
| Blacklist IPs | - | IPs that are blocked |
| Enable Logging | No | Log rate limiting events |
- Behavior: Each form has separate rate limit counters
- Configuration: Uses the same global settings for all forms
- Example:
- Contact form: 5 attempts per 15 minutes
- Newsletter form: 5 attempts per 15 minutes
- Both use the same rate limit settings, but have independent counters
- Behavior: All forms share the same rate limit counter
- Configuration: Uses global settings applied across all forms
- Example: 5 attempts per 15 minutes across ALL forms combined
- Use case: Prevents attackers from switching between forms to bypass limits
# Extension Configuration
enabled: true
limitingMode: per_form
defaultLimit: 5
defaultInterval: "15 minutes"# Apply rate limits across ALL forms
enabled: true
limitingMode: global
defaultLimit: 3
defaultInterval: "1 hour"# Whitelist trusted IPs
whitelistIps: "127.0.0.1, 192.168.1.*, 10.0.0.100"
# Blacklist problematic IPs
blacklistIps: "192.168.1.50, 10.0.1.*"Trusted IP addresses that bypass all rate limiting:
- Exact IPs:
127.0.0.1 - Wildcards:
192.168.1.* - Multiple:
127.0.0.1, 192.168.1.*, 10.0.0.50
Completely block problematic IP addresses:
- Supports same pattern matching as whitelist
- Takes precedence over whitelisting
- Returns immediate 429 error
User-friendly error page with:
- Uses configured ErrorHandler f. http status 429 if present.
- Else a error message is shown
JSON response with:
{
"error": "Rate limit exceeded for form 'contact-form'. Try again in 60 seconds.",
"formIdentifier": "contact-form",
"retryAfter": 60
}Enable logging to monitor:
- Form submission attempts
- Rate limit violations
- IP whitelist/blacklist matches
# Clear all caches
vendor/bin/typo3 cache:flush- β Check extension is activated
- β Clear all caches
- β Verify configuration
- β Check error logs
- β Global setting enabled?
- β IP whitelisted?
- β Form uses TYPO3 form framework?
- β Middleware registered?
- β IP blacklisted?
- β Settings too restrictive?
- β Clear cache storage
- β Check for conflicts
Request β Middleware β IP Check β Rate Limit β Form Processing
β β β β β
POST Extract White/Black Symfony TYPO3 Form
Request Form ID list Check RateLimiter Framework
- FormRateLimitMiddleware: Intercepts form submissions
- RateLimiterService: Creates and manages rate limiters
- ConfigurationService: Handles global extension settings
- Symfony RateLimiter: Provides sliding window rate limiting algorithm
- TYPO3 Caching Framework: Stores rate limiting data
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Add tests for new features
- Submit a pull request
GPL-2.0
Developed by plan2net GmbH
For support and questions:
- Create an issue on GitHub
- Check the documentation
- Review troubleshooting guide
Made with β€οΈ for the TYPO3 community