Protect FileDownloadController with reCAPTCHA v3 and rate limiting #40
Reference in New Issue
Block a user
Delete Branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #39
Changes
file_download)UI change required
Before triggering download:
grecaptcha.execute(siteKey, {action: 'file_download'})then append?captchaToken=<token>to the URL.- Require captchaToken query param on initial (non-range) download requests - Range requests (HTTP resume) bypass captcha — they are continuations of an already-validated download - Add download rate limit policy: 5 requests / 1 min per IP (configured in .env) - Inject ICaptchaVerifier; action name is file_download UI change required: execute grecaptcha.execute(siteKey, {action: 'file_download'}) before triggering the download and append ?captchaToken=<token> to the URL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5 requests / 1 min per IP. docker-compose.yml wired with ${VAR:-default}. Staging and production .env files updated locally (gitignored). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>Pull request closed