12 Commits
Author SHA1 Message Date
root 3618323192 fix(security): P1/P2 审计修复 + JWT HttpOnly Cookie 双模认证 + 限流
- P0/P1 审计修复: 滑块验证码不再下发 x_position/成败即销毁 key、
  user-login 补失败计数+滑块门控、限流标识改 X-Real-IP、
  百度翻译 appkey 环境化、ChangeEmail/ChangePhone 补调 avalidate、
  logs/tasks.py Count(filter=Q) 修复、chat 收藏 SSRF 内网黑名单
- P1 #6/7: token_blacklist + ROTATE_REFRESH_TOKENS 开启,
  /user/token/refresh/ 挂载
- #2 JWT HttpOnly Cookie 双模认证: user/cookie_auth.py 种/清 Cookie,
  user/authentication.py CookieOrHeaderJWTAuthentication(Bearer 优先/_COOKIE 兜底),
  user/views/token.py CookieTokenRefreshView + UserLogoutAPIView(/user/logout/),
  create_standardized_response 自动对含 token 的响应种 Cookie,
  异步视图内 RefreshToken.for_user 全部 sync_to_async 包裹(修 SynchronousOnlyOperation 500),
  WS ChatConsumer 优先读 Cookie token
- P2 #11 限流: utils/rate_limit.py 固定窗口频控,
  shorturl 生成 匿名10次/分+登录60次/分, 邮箱验证码 同邮箱60s1次+同IP10次/10min,
  登录/注册验证码 错5次作废+成功即销毁防重放, 换绑邮箱/手机 同步落地,
  urls.py 补挂 shorturl 路由(此前 404)
2026-09-08 11:28:00 +08:00
async-upgrade 50ae676bb2 fix: never_cache sync wrapper broke async dispatch - add async_never_cache_dispatch (wallet/login_record/tasks) 2026-09-06 16:27:17 +08:00
async-upgrade 2c28b87f1e fix: final serializer.data -> adata migration (chat/blacklist/article), blacklist select_related 2026-09-06 14:45:16 +08:00
async-upgrade 571641e539 feat: 100% async - native async serializers (adata/asave/acreate), async cache (redis.asyncio), view call-site migration 2026-09-06 14:36:41 +08:00
async-upgrade 8f488fcaaa feat: ADRF async views (phase1) + native async serializers (phase2) + async cache infra 2026-09-06 14:26:17 +08:00
chunyu 9a6577f71e fix: unreachable /api/apidirectory/ include (route order), add user & apidirectory index views, include static/ in docker image 2026-09-04 13:44:33 +08:00
chunyu 0fd6d5faa8 merge origin/main: adopt env-var secrets fix, keep no-SQLite structure 2026-09-04 12:50:38 +08:00
chunyu f53d6cd5b9 feat: add user websocket channel (consumers+routing), drop USE_SQLITE branch 2026-09-04 12:47:19 +08:00
chunyu a2ba489b46 fix: bug scan - fix 10 bugs across backend (search field names, missing import, file handle leak, None guard, race condition, hardcoded secrets) 2026-08-28 13:49:55 +08:00
chunyu 7fddafd9c1 rename brand to 可乐 2026-08-07 19:11:41 +08:00
chunyu dcc84def15 rename to 星雨, add dnspython dep 2026-08-06 22:47:47 +08:00
chunyu d48ec1747c sync from local backup 2026-08-05 23:59:15 +08:00