Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16931#issuecomment-3808557014

Daniel34e3261bce59
diff --git a/kernel/api/outline.go b/kernel/api/outline.go
index 83c35c6e39..5530720eee 100644
--- a/kernel/api/outline.go
+++ b/kernel/api/outline.go
@@ -44,6 +44,10 @@ func getDocOutline(c *gin.Context) {
}
rootID := arg["id"].(string)
+ if util.InvalidIDPattern(rootID, ret) {
+ return
+ }
+
headings, err := model.Outline(rootID, preview)
if err != nil {
ret.Code = 1