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/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 {
|
||||
for _, customEmoji := range customEmojis {
|
||||
name := customEmoji.Name()
|
||||
if strings.HasPrefix(name, ".") {
|
||||
if strings.HasPrefix(name, ".") || strings.Contains(name, "<") {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ func getEmojiConf(c *gin.Context) {
|
|||
}
|
||||
|
||||
name = subCustomEmoji.Name()
|
||||
if strings.HasPrefix(name, ".") {
|
||||
if strings.HasPrefix(name, ".") || strings.Contains(name, "<") {
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue