Commit Graph
14 Commits
Author SHA1 Message Date
fit2cloud-chenywandClaude bbfc4cc8f5 fix(Security): Host header injection auth bypass and forged admin embedded token (CNVD)
- TokenMiddleware/ResponseMiddleware/audit logger use scope['path']
  instead of request.url.path for whitelist checks: a crafted Host
  header (e.g. x/api/v1/mcp) was concatenated into Starlette's URL
  and made protected routes match the /mcp* whitelist entry
- validateEmbedded rejects admin accounts and non-type-4 apps, so a
  self-signed token with account=admin can no longer impersonate the
  administrator
- Add HostValidationMiddleware rejecting malformed Host headers at the
  outermost layer (defense in depth)
- Add regression tests for host validation, whitelist matching and
  source-level guards

Co-Authored-By: Claude <[email protected]>
2026-08-31 11:05:05 +08:00
fit2cloud-chenyw 559c80c5b9 perf: Optimize frontend localStorage key conflicts 2026-04-14 12:04:13 +08:00
fit2cloud-chenyw 5c136b46c5 perf: Optimize Embedded Assistant Cache Settings 2026-03-17 14:38:42 +08:00
fit2cloud-chenyw 6d63dcefc5 fix: Clickjacking Attack 2026-03-16 15:44:57 +08:00
junjun 2952c87d16 feat: Add Api Docs 2025-12-11 14:52:27 +08:00
ulleo cefa0bb80c feat: MCP mcp/mcp_question support param to disable streaming 2025-09-22 18:35:38 +08:00
ulleo dca52ce1b2 feat: MCP mcp/mcp_question support param to disable streaming 2025-09-22 18:35:38 +08:00
fit2cloud-chenyw 8e01bf6484 perf: Exception msg 2025-07-28 10:08:15 +08:00
fit2cloud-chenyw 2dbc9b4590 perf: Enable user cache 2025-07-23 17:49:37 +08:00
fit2cloud-chenyw 63a1d1fe7d feat: Log file 2025-07-23 15:59:23 +08:00
fit2cloud-chenyw 8c00b44777 perf: dev error msg 2025-07-23 12:41:14 +08:00
fit2cloud-chenyw 61404ee8b1 perf: Model config page 2025-07-04 15:21:04 +08:00
fit2cloud-chenyw c7c7416160 perf: Chat and model 2025-05-12 19:16:28 +08:00
fit2cloud-chenyw f2315cf2d9 feat: Unified response model and exception handling 2025-05-08 15:47:48 +08:00