mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02: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()
|
||||
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{
|
||||
ID: id,
|
||||
Name: boxConf.Name,
|
||||
Icon: boxConf.Icon,
|
||||
Icon: icon,
|
||||
Sort: boxConf.Sort,
|
||||
SortMode: boxConf.SortMode,
|
||||
Closed: boxConf.Closed,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue