Skip to content

Commit 051b069

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 548c9fc + 996a238 commit 051b069

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

kernel/filesys/tree.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ func LoadTreeByData(data []byte, boxID, p string, luteEngine *lute.Lute) (ret *p
149149
ret.Root.Path = p
150150

151151
parts := strings.Split(p, "/")
152+
if 2 < len(parts) {
153+
logging.LogErrorf("parse tree [%s] failed: invalid path", p)
154+
err = errors.New("invalid path")
155+
return
156+
}
157+
152158
parts = parts[1 : len(parts)-1] // 去掉开头的斜杆和结尾的自己
153159
if 1 > len(parts) {
154160
ret.HPath = "/" + ret.Root.IALAttr("title")

0 commit comments

Comments
 (0)