mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +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
d33c9d736b
commit
be2cd45eac
2 changed files with 21 additions and 2 deletions
|
|
@ -196,6 +196,13 @@ func (box *Box) GetConf() (ret *conf.BoxConf) {
|
|||
logging.LogErrorf("parse box conf [%s] failed: %s", confPath, err)
|
||||
return
|
||||
}
|
||||
|
||||
icon := ret.Icon
|
||||
if strings.Contains(icon, ".") {
|
||||
// XSS through emoji name https://github.com/siyuan-note/siyuan/issues/15034
|
||||
icon = util.FilterUploadFileName(icon)
|
||||
ret.Icon = icon
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue