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/17753#issuecomment-4544741363

Daniel9cd4b106983b
diff --git a/kernel/util/path.go b/kernel/util/path.go
index eb729b4fa2..01635f7a3c 100644
--- a/kernel/util/path.go
+++ b/kernel/util/path.go
@@ -459,9 +459,9 @@ func IsSensitivePath(p string) bool {
return true
}
- // 工作空间/temp/ 目录(小写比较)
- workspaceTempPrefix := strings.ToLower(filepath.Join(WorkspaceDir, "temp"))
- if !strings.HasSuffix(p, ".zip") /* 系统日志导出 */ && strings.HasPrefix(toCheckPathLower, workspaceTempPrefix) {
+ // 只允许导出工作空间/temp/export 目录(小写比较)
+ workspaceTempExportPrefix := strings.ToLower(filepath.Join(WorkspaceDir, "temp", "export"))
+ if !strings.HasPrefix(toCheckPathLower, workspaceTempExportPrefix) {
return true
}