mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-12 15:42:34 +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
3a991f8075
commit
526e436fbc
3 changed files with 18 additions and 1 deletions
|
|
@ -699,6 +699,11 @@ func ChangeBoxSort(boxIDs []string) {
|
|||
}
|
||||
|
||||
func SetBoxIcon(boxID, icon string) {
|
||||
if strings.Contains(icon, ".") {
|
||||
// XSS through emoji name https://github.com/siyuan-note/siyuan/issues/15034
|
||||
icon = util.FilterUploadFileName(icon)
|
||||
}
|
||||
|
||||
box := &Box{ID: boxID}
|
||||
boxConf := box.GetConf()
|
||||
boxConf.Icon = icon
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue