# Changelog (laravel-rust-captcha)

> What changed in each release of laravel-rust-captcha: additions, changes and fixes.

- Package: laravel-rust-captcha (Laravel for Rust, alpha), crates: `laravel-rust-captcha`
- Maintenance: active; Latest release: 0.1.0 (2026-12-04); Framework: laravel-rust 0.2.x; MSRV: Rust 1.99 or later; Licence: MIT
- Links: [Repository](https://github.com/bowerbird-si/laravel-rust-captcha), [crates.io](https://crates.io/crates/laravel-rust-captcha/0.1.0), [docs.rs](https://docs.rs/laravel-rust-captcha/0.1.0), [Changelog](https://oss.bowerbird.si/captcha/docs/changelog/), [Contributing](https://github.com/bowerbird-si/laravel-rust-captcha/blob/57c677c77d6c928790e0acaf24e0b3f0ff06f29c/CONTRIBUTING.md), [Security policy](https://github.com/bowerbird-si/laravel-rust-captcha/blob/57c677c77d6c928790e0acaf24e0b3f0ff06f29c/SECURITY.md)
- Based on: [mews/captcha](https://github.com/mewebstudio/captcha): The captcha package this ports: profiles, config keys, routes and validation, following version 3.5.1. Its backgrounds and fonts ship with their own licences.
- PHP parity: full (54 covered, 33 diverged, 0 planned of 87 abilities; 44 fixtures; follows mews/captcha 3.5.1; verified 2026-12-04)
- Community package, not affiliated with Laravel.
- HTML version: https://oss.bowerbird.si/captcha/docs/changelog/
- Source: https://github.com/bowerbird-si/laravel-rust-captcha/blob/57c677c77d6c928790e0acaf24e0b3f0ff06f29c/CHANGELOG.md

## [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,
  and `CaptchaConfig::from_php_json` for a PHP config export.
- The image route `GET /captcha/{profile?}` and the keyed JSON route `GET /captcha/api/{profile?}`.
- The `Captcha` validation rule in session and keyed mode, the `CaptchaManager` service, the helpers
  `src`, `img`, `issue`, `check` and `check_keyed`, and the MiniJinja functions `captcha_src`,
  `captcha_img` and `captcha_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`, `seed` and `seed_keyed`.

### Setup

- Register `CaptchaServiceProvider`, and call `CaptchaServiceProvider::configure_input` in
  `with_middleware`, so the answer and key fields keep their raw values.
- In production, point `CAPTCHA_STORE` at a shared store and set `CAPTCHA_TRUST_STORE=true` once 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_img` keeps only inert attributes. Input parsers were fuzzed; see `design/fuzzing.md`.
