mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🔒 XSS through emoji name https://github.com/siyuan-note/siyuan/issues/13658
This commit is contained in:
parent
562ce58796
commit
77efc5cca4
1 changed files with 2 additions and 2 deletions
|
|
@ -162,7 +162,7 @@ func getEmojiConf(c *gin.Context) {
|
||||||
} else {
|
} else {
|
||||||
for _, customEmoji := range customEmojis {
|
for _, customEmoji := range customEmojis {
|
||||||
name := customEmoji.Name()
|
name := customEmoji.Name()
|
||||||
if strings.HasPrefix(name, ".") {
|
if strings.HasPrefix(name, ".") || strings.Contains(name, "<") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -180,7 +180,7 @@ func getEmojiConf(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
name = subCustomEmoji.Name()
|
name = subCustomEmoji.Name()
|
||||||
if strings.HasPrefix(name, ".") {
|
if strings.HasPrefix(name, ".") || strings.Contains(name, "<") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue