Skip to content

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

:lock: https://github.com/siyuan-note/siyuan/security/advisories/GHSA-5vwq-4757-x99q

Daniel3c6b784ffd14
diff --git a/kernel/api/asset.go b/kernel/api/asset.go
index ee83f45c3f..a6606cebb2 100644
--- a/kernel/api/asset.go
+++ b/kernel/api/asset.go
@@ -65,6 +65,11 @@ func statAsset(c *gin.Context) {
return
}
+ if !util.IsAbsPathInWorkspace(p) {
+ ret.Code = 1
+ return
+ }
+
info, err := os.Stat(p)
if err != nil {
ret.Code = 1