mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
🔒 XSS through emoji name https://github.com/siyuan-note/siyuan/issues/15034 https://github.com/siyuan-note/siyuan/pull/15041
This commit is contained in:
parent
76d3fa3895
commit
f95d3b99bd
1 changed files with 7 additions and 1 deletions
|
|
@ -127,10 +127,16 @@ func ListNotebooks() (ret []*Box, err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
id := dir.Name()
|
id := dir.Name()
|
||||||
|
icon := boxConf.Icon
|
||||||
|
if strings.Contains(icon, ".") { // 说明是自定义图标
|
||||||
|
// XSS through emoji name https://github.com/siyuan-note/siyuan/issues/15034
|
||||||
|
icon = util.FilterUploadFileName(icon)
|
||||||
|
}
|
||||||
|
|
||||||
box := &Box{
|
box := &Box{
|
||||||
ID: id,
|
ID: id,
|
||||||
Name: boxConf.Name,
|
Name: boxConf.Name,
|
||||||
Icon: boxConf.Icon,
|
Icon: icon,
|
||||||
Sort: boxConf.Sort,
|
Sort: boxConf.Sort,
|
||||||
SortMode: boxConf.SortMode,
|
SortMode: boxConf.SortMode,
|
||||||
Closed: boxConf.Closed,
|
Closed: boxConf.Closed,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue