Przeglądaj źródła

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

Co-authored-by: chrisli <chris.li@grapecity.com>
lindalin 2 lat temu
rodzic
commit
cf71d86263
1 zmienionych plików z 3 dodań i 0 usunięć
  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)
 					}