An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:lock: Validate attribute view ID before file access https://github.com/siyuan-note/siyuan/security/advisories/GHSA-43jx-gxq4-jpjc
Daniela7ac874a4f15
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex 33a6bfcce3..63c6cec7f7 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -53,6 +53,11 @@ import ()func RemoveUnusedAttributeView(id string) {+ // 防御性校验:ID 必须是合法的节点 ID 格式,防止通过路径穿越读取或删除任意文件+ if !ast.IsNodeIDPattern(id) {+ return+ }+base := filepath.Join(util.DataDir, "storage", "av")absPath := filepath.Join(base, id+".json")if !filelock.IsExist(absPath) {