mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🔒 Some security vulnerabilities https://github.com/siyuan-note/siyuan/issues/13426
This commit is contained in:
@@ -80,6 +80,12 @@ func renderTemplate(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if !util.IsAbsPathInWorkspace(p) {
|
||||
ret.Code = -1
|
||||
ret.Msg = "Path [" + p + "] is not in workspace"
|
||||
return
|
||||
}
|
||||
|
||||
preview := false
|
||||
if previewArg := arg["preview"]; nil != previewArg {
|
||||
preview = previewArg.(bool)
|
||||
|
||||
Reference in New Issue
Block a user