Commit Graph
1 Commits
Author SHA1 Message Date
snowy-yang 915358405c feat(routes): 迁移注册/找回密码/卡密/验证码端点
- web/routers/register.py:auth/send_code、auth/register、auth/trial、
  auth/redeem、auth/forgot_password
- 同步调用(SQLite 事务/SMTP/PBKDF2)走 asyncio.to_thread;发码 IP 限流复用
  auth_routes._SEND_CODE_IP(跨栈共享计数)
- 注册成功路径签发会话 Cookie;管理员找回密码仍防枚举拦截

测试:tests/test_register.py 6 项沙箱用例(播种验证码绕 SMTP)——
协议门槛、注册成功建号+赠送+会话可用、验证码错误、找回重置后可登录、
管理员找回被拦、卡密充值。
全套:pytest 62/62;ruff All checks passed;pyright 0 errors;冒烟 10/10。
2026-09-26 10:00:39 +08:00