ext/web W1–W3: middleware, data layer, and security hardening

Deliver the interrupted network extension backlog: declarative middleware
(CORS, security headers, gzip, JSON API), SQLite pool/transactions/pagination,
and W3 security (argon2 passwords, CSRF on forms/login, persistent sessions,
CSPRNG ids, login rate limiting). Adds gold smokes and author-facing
hash_password on ext/web.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-28 09:35:39 +08:00
1 parent da9fc75b1e
commit be6223f1fb
22 files changed
+3081 -343

No files matched your search

+5 -3
View File
@@ -2,7 +2,7 @@
| | |
|---|---|
| 状态 | **W0–W3 骨架已落地;W4 待** |
| 状态 | **W0–W3.5 + 安全硬化已落地;内容标配 W4 进行中** |
| 日期 | 2026-08-11 |
| **锁定设计** | [design/ext-web.md](../design/ext-web.md) |
| 相关 | [ext-cli.md](../design/ext-cli.md) · [ext-abi.md](../design/ext-abi.md) · [ext-llm.md](../design/ext-llm.md) |
@@ -25,11 +25,13 @@
| **W0** | CATALOG + L1 + `web_listen` Hello | **done** |
| **W1** | env 端口;`page` 四栏;nav 表;static | **done** |
| **W2** | SQLite `define`/`migrate`/`all` | **done** |
| **W3** | 三列绑定;变量名即表名;`/admin` CRUD+日志+布局 | **done**(登录鉴权仍简) |
| **W3** | 三列绑定;变量名即表名;`/admin` CRUD+日志+布局 | **done** |
| **W3s** | 安全硬化:argon2 密码哈希、CSRF、SQLite 会话持久化、CSPRNG、登录限速 | **done** |
| **W3.5** | 人写面首版:`web.assemble` + `` `表`.`字段` `` + `examples/man-write-site` | **done**(编排袋仍可再瘦) |
| **W4** | Postgres;Redis / S3 驱动 | pending |
| **W4c** | 内容标配:SEO / Markdown / RSS / 分页 UI(见 [web-net-capabilities.md](../design/web-net-capabilities.md)) | in progress |
验收金样:`tests/ext/web-smoke.mq.md`、`ext_cli_add_web`。
验收金样:`tests/ext/web-smoke.mq.md`、`tests/ext/web-security-smoke.mq.md`、`ext_cli_add_web`。
---