docs(plugins): captcha = ninjatpl tag + host-stamped X-Bn-Verified-Captcha; core imports forbidden

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Alex Dunmow 2026-07-07 23:12:17 +08:00
parent cbc598f5d5
commit 34c2b73801

View File

@ -166,6 +166,12 @@ marshaling to host functions. Full family/method table + disposition of every
- `Interceptors`, `CoreServiceBindings`**host-side**; RBAC method roles merge from the
manifest, auth context arrives via forwarded HTTP headers (host interceptors already ran).
- **Captcha is host-verified** (pluginsdk ≥ v0.2.2): a guest cannot hold the host's
stateful captcha server, so never import `block/core/captcha` (any core import/require
fails check-safety). Render the widget with the ninjatpl captcha tag; enforce with
`auth.CaptchaVerified(r.Header)` — the host consumes the posted `cap-token` and stamps
the unforgeable `X-Bn-Verified-Captcha` trusted header before dispatch. Fail closed
when it returns false. Reference: calcomblock `HandleCreateBooking`.
- `AppURL`/`MediaPath` — delivered once in `LoadRequest.host_config`.
- **`deps.Provisioner` (core ≥ v0.17.x) is the seeding path** — `EnsurePage`,
`EnsureMenuItem`, `EnsureMedia`, `EnsureSetting`, `MergeSiteSettings`, data