Skip to content

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

:lock: SQL injection security vulnerabilities https://github.com/siyuan-note/siyuan/issues/13077 https://github.com/siyuan-note/siyuan/issues/13059

Daniel831d3506536d
diff --git a/kernel/model/asset_content.go b/kernel/model/asset_content.go
index f41e3ef89d..c22cecade9 100644
--- a/kernel/model/asset_content.go
+++ b/kernel/model/asset_content.go
@@ -63,6 +63,9 @@ func GetAssetContent(id, query string, queryMethod int) (ret *AssetContent) {
query = stringQuery(query)
}
}
+ if !ast.IsNodeIDPattern(id) {
+ return
+ }
table := "asset_contents_fts_case_insensitive"
filter := " id = '" + id + "'"