mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-23 00:36:10 +01:00
🔒 Some XSS vulnerabilities https://github.com/siyuan-note/siyuan/issues/13171
This commit is contained in:
parent
74db798a04
commit
096fea2c8f
4 changed files with 14 additions and 14 deletions
|
|
@ -169,7 +169,7 @@ func LoadTreeByData(data []byte, boxID, p string, luteEngine *lute.Lute) (ret *p
|
|||
if "" == title {
|
||||
title = "Untitled"
|
||||
}
|
||||
hPathBuilder.WriteString(title)
|
||||
hPathBuilder.WriteString(util.UnescapeHTML(title))
|
||||
hPathBuilder.WriteString("/")
|
||||
}
|
||||
hPathBuilder.WriteString(ret.Root.IALAttr("title"))
|
||||
|
|
@ -301,13 +301,3 @@ func parseJSON2Tree(boxID, p string, jsonData []byte, luteEngine *lute.Lute) (re
|
|||
}
|
||||
return
|
||||
}
|
||||
|
||||
func ReadDocIAL(data []byte) (ret map[string]string) {
|
||||
ret = map[string]string{}
|
||||
val := jsoniter.Get(data, "Properties")
|
||||
if nil == val || val.ValueType() == jsoniter.InvalidValue {
|
||||
return
|
||||
}
|
||||
val.ToVal(&ret)
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue