mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-26 19:38:48 +01:00
🔒 XSS through emoji name https://github.com/siyuan-note/siyuan/issues/15034
This commit is contained in:
parent
3c00382811
commit
8d9e786c77
1 changed files with 7 additions and 0 deletions
|
|
@ -180,6 +180,13 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
|
|||
blockIDs[n.ID] = newNodeID
|
||||
n.ID = newNodeID
|
||||
n.SetIALAttr("id", newNodeID)
|
||||
|
||||
if icon := n.IALAttr("icon"); "" != icon {
|
||||
// XSS through emoji name https://github.com/siyuan-note/siyuan/issues/15034
|
||||
icon = util.FilterUploadEmojiFileName(icon)
|
||||
n.SetIALAttr("icon", icon)
|
||||
}
|
||||
|
||||
return ast.WalkContinue
|
||||
})
|
||||
tree.ID = tree.Root.ID
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue