docs: CLAUDE.md 重写 + 企业集成设计 + 27个Bug修复 - #16
Open
nopassword2000 wants to merge 9 commits into
Open
Conversation
added 9 commits
May 30, 2026 12:16
严重修复: - JWT密钥/超管密码移除弱默认值,部署时必须显式设置 - API Key权限绕过修复,不再硬编码is_admin=True - 容器以非root用户运行 - router_settings重复插入修复 - 数据库索引已存在于init.sql 重要修复: - LiteLLM孤儿用户创建失败时cleanup - crypto解密失败加warning日志 - logging.py改用settings.log_dir - efficiency 404改用HTTPException - delete_user重命名为deactivate_user - 批量更新返回失败明细 - URL参数传递token已移除 - accessTest.ts改用统一request函数 - request.ts JSON解析加安全try-catch - 删除5个未引用的效率视图 - nginx安全头 - docker-compose.middleware.yaml默认值+日志限制 建议改进: - .env路径改为基于__file__的绝对路径 - log_dir加入Settings - createEfficiencyReport API函数 - Dockerfile镜像ARGS化+Node 22 - agent_usage_logs CASCADE改为SET NULL
Owner
|
感谢提交PR,review中 |
Owner
|
需要警惕的问题(按风险排序)
PR 把 PUT /api/v1/ai-keys/batch 的返回从 {success, fail} 改成了 {successes:[], failures:[]}(apps/api/v1/ai_keys.py),但前端 ai-key.ts:136 的 batchUpdateResources 仍然声明返回 {success, fail},且 BatchResourceDialog.vue:193 直接用 result.success。 合并后:批量设置资源的成功提示会显示 "成功 undefined 个"。功能本身能跑,但提示坏了。这是前后端没对齐的遗漏。
两个改动:
这第二点其实是安全修复(原代码给所有 API Key 默认管理员权限,是越权漏洞),方向对。但写法用 hasattr 判断一个明确不存在的属性,是无意义的防御,等于硬编码 False。如果现有有任何 AI Key 在走管理操作,合并后会立刻 403——需要确认没有这种依赖。
Dockerfile 新增 USER aihelms 非 root 运行,supervisord 也从 user=root 改成 user=aihelms。安全上是好事,但:
良性改动(可放心合并的部分)
几个要你确认的点
|
Owner
|
您好,感谢提交的PR,请提交到dev分支。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
文档建设
Bug修复
安全修复(6个严重问题)
其他修复(21个)
详见 git log,涵盖架构改进、前端安全、基础设施加固
🤖 Generated with Claude Code