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
3a991f8075
commit
526e436fbc
3 changed files with 18 additions and 1 deletions
|
|
@ -231,6 +231,13 @@ func InitConf() {
|
|||
if 1 > len(Conf.Editor.Emoji) {
|
||||
Conf.Editor.Emoji = []string{}
|
||||
}
|
||||
for i, emoji := range Conf.Editor.Emoji {
|
||||
if strings.Contains(emoji, ".") {
|
||||
// XSS through emoji name https://github.com/siyuan-note/siyuan/issues/15034
|
||||
emoji = util.FilterUploadFileName(emoji)
|
||||
Conf.Editor.Emoji[i] = emoji
|
||||
}
|
||||
}
|
||||
if 9 > Conf.Editor.FontSize || 72 < Conf.Editor.FontSize {
|
||||
Conf.Editor.FontSize = 16
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue