FlatCaptcha
Version 1.2.4 | GPL3 | flatboard.org
Compatibility: Flatboard Pro ≥ 5.0.0
License: GPL3
Download: in resources management
Autonomous and secure CAPTCHA plugin for Flatboard 5. Bot protection without third-party services, based on math and logic questions signed with HMAC-SHA256.



Features
- Math and logic questions generated dynamically (addition, subtraction, multiplication, missing number, general knowledge)
- HMAC-SHA256 signed token (anti-forgery and anti-replay protection)
- Minimum submit time check (timing-based bot detection)
- Server-side blocking, lightweight client-side validation
- AJAX/REST communication (compatible with standard Flatboard forms)
- Admin dashboard with:
- HMAC secret key management (cryptographic key generation, masked display, one-click save)
- Monthly bot-block statistics since plugin activation
- Breakdown by context (registration, login, new topic, reply) and by block reason
- 2FA exemption — members who have enabled Flatboard's two-factor authentication (TOTP) can be automatically exempt from the CAPTCHA (configurable)
- Multilingual: French, English, German, Portuguese, Chinese
- 100% self-hosted — no external dependency
Installation
- Copy the
FlatCaptchafolder into your Flatboardplugins/directory. - Enable the plugin from Admin → Plugins.
- Configure options under Admin → Plugins → FlatCaptcha → Settings.
- Access the admin dashboard via Admin → Plugins → FlatCaptcha → Admin view.
Configuration
Plugin Settings (standard)
| Parameter | Default | Description |
|---|---|---|
| Minimum submit time | 3s | Minimum delay before a submission is accepted |
| CAPTCHA validity | 10 min | CAPTCHA expiry (1–60 min) |
| Enable on Registration | ✅ | Protects the registration form |
| Enable on New topic | ✅ | Protects topic creation |
| Enable on Reply | ✅ | Protects reply forms |
| Enable on Login | ✅ | Protects the login form |
| Exempt members with 2FA | ✅ | Members with TOTP enabled bypass the CAPTCHA |
Admin View (HMAC key)
Access /plugin/flatcaptcha/admin to:
- Generate a cryptographically secure HMAC key (96 hex characters, 48 random bytes via
crypto.getRandomValues) - Save the key with one click
- View monthly blocking statistics
⚠️ If no custom key is set, Flatboard's internal key (
APP_SECRET) is used automatically.
Block Statistics
The plugin records every blocked attempt in stats.json (inside the plugin folder):
{
"activated_at": "2026-01-15",
"total_blocks": 142,
"monthly": {
"2026-01": {
"total": 87,
"by_context": { "registration": 52, "login": 35 },
"by_reason": { "too_fast": 41, "invalid": 28, "missing": 18 }
}
}
}
Recorded block reasons:
too_fast— submission too fast (bot detected by timing)invalid— invalid or forged HMAC tokenmissing— missing fields (automated submission)replay— token already consumed (replay attempt)expired— expired tokenwrong— wrong answer
API Endpoints
| Method | URL | Description |
|---|---|---|
| GET | /api/flatcaptcha/generate | Generates a question + signed token |
| POST | /api/flatcaptcha/verify | Verifies an answer |
| POST | /api/flatcaptcha/admin/save-key | Saves the HMAC key (admin only) |
| POST | /api/flatcaptcha/admin/reset-stats | Resets statistics (admin only) |
License
GPL3 — Flatboard Team
Edited on Feb 24, 2026 By Fred .
- captcha hmac-sha256 forum-security self-contained
- Heart(1)
arpinux