瀏覽代碼

emoji: filter nesting folder of custom emoji before adding emoji (#8903)

Co-authored-by: chrisli <chris.li@grapecity.com>
lindalin 1 年之前
父節點
當前提交
cf71d86263
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      kernel/api/system.go

+ 3 - 0
kernel/api/system.go

@@ -128,6 +128,9 @@ func getEmojiConf(c *gin.Context) {
 						if strings.HasPrefix(name, ".") {
 							continue
 						}
+						if subCustomEmoji.IsDir() {
+							continue
+						}
 
 						addCustomEmoji(customEmoji.Name()+"/"+name, &items)
 					}