Repository navigation
fix url upload sec - #1839
Merged
Merged
fix url upload sec#1839
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Sitemap 中未转义的可配置 URL 会导致无效 XML 或 XML 注入。
1 open finding
What changed in this PR
本 PR 调整字符串构建方式,并同步重新生成 Swagger 文档。
Changes:
- 使用
fmt.Fprintf直接写入字符串构建器。 - 更新 Swagger 模型的全限定引用名称。
- 当前 sitemap URL 输出仍缺少 XML 转义。
| File | Description |
|---|---|
backend/usecase/sitemap.go |
调整 sitemap 字符串构建。 |
backend/usecase/llm.go |
调整图片 Markdown 拼接。 |
backend/domain/llm.go |
调整文档上下文拼接。 |
backend/docs/swagger.yaml |
更新 Swagger YAML。 |
backend/docs/swagger.json |
更新 Swagger JSON。 |
backend/docs/docs.go |
更新生成的 Swagger Go 文档。 |
Files not reviewed (2)
- backend/cmd/api/wire_gen.go: Generated file
- backend/docs/docs.go: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
coltea
force-pushed
the
fix-url-upload-sec
branch
from
October 9, 2026 08:49
6e5c525 to
4ae384d
Compare
coltea
force-pushed
the
fix-url-upload-sec
branch
from
October 9, 2026 08:54
4ae384d to
3720156
Compare
coltea
force-pushed
the
fix-url-upload-sec
branch
from
October 9, 2026 08:58
3720156 to
cc2c6b2
Compare
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
远程上传的公共用例产生未声明的 API 破坏,同时 Swagger 与已提交的前端客户端类型不同步。
2 open findings
2 resolved since last review
Files not reviewed (2)
- backend/cmd/api/wire_gen.go: Generated file
- backend/docs/docs.go: Generated file
🧠 Review effort: Balanced
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.


No description provided.