[0.1.0] - 2026-12-04
First release, as an alpha: the API may still change before 1.0.
Added
- A Rust port of mews/captcha 3.5.1 for Laravel for Rust: every PHP ability is covered by a test or listed
as a deliberate difference in
parity.toml(54 covered, 33 different). - Profiles with every PHP key (
length, sizes,math,expire, lines, angle, backgrounds, colours,contrast,sharpen,blur,invert,sensitive, padding and margin), the five shipped profiles, andCaptchaConfig::from_php_jsonfor a PHP config export. - The image route
GET /captcha/{profile?}and the keyed JSON routeGET /captcha/api/{profile?}. - The
Captchavalidation rule in session and keyed mode, theCaptchaManagerservice, the helperssrc,img,issue,checkandcheck_keyed, and the MiniJinja functionscaptcha_src,captcha_imgandcaptcha_field. - Unicode answers are measured after case mapping, at boot and when generated.
- Colours as PHP's Intervention Image reads them: hex,
rgb(),hsl()and named colours. - A renderer that follows PHP's GD drawing: filters match GD within one channel unit and glyph bounds within two pixels, checked against fixtures from the real package.
- The PHP package's fonts and backgrounds, bundled with their licences (feature
bundled-assets). - Test helpers:
testing::fix_answers,seedandseed_keyed.
Setup
- Register
CaptchaServiceProvider, and callCaptchaServiceProvider::configure_inputinwith_middleware, so the answer and key fields keep their raw values. - In production, point
CAPTCHA_STOREat a shared store and setCAPTCHA_TRUST_STORE=trueonce its backend is verified. Laravel for Rust 0.2 can't tell the package which implementation backs a store (laravel/rust-framework#869).
Security
- Each challenge has a random id; answers are verified with a keyed HMAC and never stored, logged, flashed as old input or sent.
- At most one pass per challenge under concurrent submissions, with every comparison counted, tested on memory, SQLite, PostgreSQL and Redis.
- Image requests and wrong answers are limited per client per clock minute, counted on the challenge store. Math profiles allow one to three attempts.
- Store operations run outside the caller's database transaction and fail closed. Production refuses
stores that can't give one authority:
discard, failover, process-local, replicated or unverified database stores, and untrusted custom drivers. captcha_imgkeeps only inert attributes. Input parsers were fuzzed; seedesign/fuzzing.md.